MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / done

Function done

lib/web/CodeMirror/src/edit/mouse_events.js:310–323  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

308 }
309
310 function done(e) {
311 cm.state.selectingText = false
312 counter = Infinity
313 // If e is null or undefined we interpret this as someone trying
314 // to explicitly cancel the selection rather than the user
315 // letting go of the mouse button.
316 if (e) {
317 e_preventDefault(e)
318 display.input.focus()
319 }
320 off(display.wrapper.ownerDocument, "mousemove", move)
321 off(display.wrapper.ownerDocument, "mouseup", up)
322 doc.history.lastSelOrigin = null
323 }
324
325 let move = operation(cm, e => {
326 if (e.buttons === 0 || !e_button(e)) done(e)

Callers 1

leftButtonSelectFunction · 0.70

Calls 3

e_preventDefaultFunction · 0.90
offFunction · 0.90
focusMethod · 0.45

Tested by

no test coverage detected