We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a51c47 commit 80ea07cCopy full SHA for 80ea07c
lib/codemirror.js
@@ -756,6 +756,8 @@ var CodeMirror = (function() {
756
function scrollEditorIntoView() {
757
if (!cursor.getBoundingClientRect) return;
758
var rect = cursor.getBoundingClientRect();
759
+ // IE returns bogus coordinates when the instance sits inside of an iframe and the cursor is hidden
760
+ if (ie && rect.top == rect.bottom) return;
761
var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
762
if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView();
763
}
0 commit comments