disable overscroll

Hunter
Thursday, July 10th, 2025 at 5:35 PM

index.html+11 

index.html
 90  			-moz-tab-size: 2 !important;
 91  		}
 92  
 93 +		/* Disable overscroll on all CodeMirror elements */
 94 +		.cm-editor, .cm-content, .cm-scroller, .cm-scrollElement {
 95 +			overscroll-behavior: none !important;
 96 +		}
 97 +
 98  		#preview {
 99  			width: 100%;
100  			height: 100%;

138  			const doc = preview.contentDocument || preview.contentWindow.document;
139  			doc.open();
140  			doc.write(code);
141 +			
142 +			// Inject CSS to disable overscroll in iframe content
143 +			const style = doc.createElement('style');
144 +			style.textContent = `* { overscroll-behavior: none !important; }`;
145 +			doc.head.appendChild(style);
146 +			
147  			doc.close();
148  			
149  			// Restore scroll position after a short delay to ensure content is rendered