(e)
| 7542 | } |
| 7543 | |
| 7544 | function done(e) { |
| 7545 | cm.state.selectingText = false; |
| 7546 | counter = Infinity; |
| 7547 | // If e is null or undefined we interpret this as someone trying |
| 7548 | // to explicitly cancel the selection rather than the user |
| 7549 | // letting go of the mouse button. |
| 7550 | if (e) { |
| 7551 | e_preventDefault(e); |
| 7552 | display.input.focus(); |
| 7553 | } |
| 7554 | off(display.wrapper.ownerDocument, "mousemove", move); |
| 7555 | off(display.wrapper.ownerDocument, "mouseup", up); |
| 7556 | doc.history.lastSelOrigin = null; |
| 7557 | } |
| 7558 | |
| 7559 | var move = operation(cm, function (e) { |
| 7560 | if (e.buttons === 0 || !e_button(e)) { done(e); } |
no test coverage detected