@@ -9,7 +9,7 @@ import { normalizeSelection, Range, Selection } from "../model/selection.js"
99import { extendRange , extendSelection , replaceOneSelection , setSelection } from "../model/selection_updates.js"
1010import { captureRightClick , chromeOS , ie , ie_version , mac , webkit , safari } from "../util/browser.js"
1111import { getOrder , getBidiPartAt } from "../util/bidi.js"
12- import { activeElt , doc , win } from "../util/dom.js"
12+ import { activeElt , doc as getDoc , win } from "../util/dom.js"
1313import { e_button , e_defaultPrevented , e_preventDefault , e_target , hasHandler , off , on , signal , signalDOMEvent } from "../util/event.js"
1414import { dragAndDrop } from "../util/feature_detection.js"
1515import { bind , countColumn , findColumn , sel_mouse } from "../util/misc.js"
@@ -128,7 +128,7 @@ function configureMouse(cm, repeat, event) {
128128
129129function leftButtonDown ( cm , pos , repeat , event ) {
130130 if ( ie ) setTimeout ( bind ( ensureFocus , cm ) , 0 )
131- else cm . curOp . focus = activeElt ( doc ( cm ) )
131+ else cm . curOp . focus = activeElt ( getDoc ( cm ) )
132132
133133 let behavior = configureMouse ( cm , repeat , event )
134134
@@ -292,7 +292,7 @@ function leftButtonSelect(cm, event, start, behavior) {
292292 let cur = posFromMouse ( cm , e , true , behavior . unit == "rectangle" )
293293 if ( ! cur ) return
294294 if ( cmp ( cur , lastPos ) != 0 ) {
295- cm . curOp . focus = activeElt ( doc ( cm ) )
295+ cm . curOp . focus = activeElt ( getDoc ( cm ) )
296296 extendTo ( cur )
297297 let visible = visibleLines ( display , doc )
298298 if ( cur . line >= visible . to || cur . line < visible . from )
0 commit comments