Skip to content

Commit 9b34840

Browse files
Me1000marijnh
authored andcommitted
Fix for new function name clashing with local variable.
1 parent fbe87a2 commit 9b34840

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/edit/mouse_events.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { normalizeSelection, Range, Selection } from "../model/selection.js"
99
import { extendRange, extendSelection, replaceOneSelection, setSelection } from "../model/selection_updates.js"
1010
import { captureRightClick, chromeOS, ie, ie_version, mac, webkit, safari } from "../util/browser.js"
1111
import { 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"
1313
import { e_button, e_defaultPrevented, e_preventDefault, e_target, hasHandler, off, on, signal, signalDOMEvent } from "../util/event.js"
1414
import { dragAndDrop } from "../util/feature_detection.js"
1515
import { bind, countColumn, findColumn, sel_mouse } from "../util/misc.js"
@@ -128,7 +128,7 @@ function configureMouse(cm, repeat, event) {
128128

129129
function 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

Comments
 (0)