isearch: fixing isearch onpase
This commit is contained in:
parent
c8b63ee977
commit
12343e0e6f
1 changed files with 5 additions and 6 deletions
|
|
@ -73,22 +73,21 @@ oop.inherits(IncrementalSearch, Search);
|
|||
this.$options.backwards = backwards;
|
||||
ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
|
||||
// we need to completely intercept paste, just registering an event handler does not work
|
||||
this.$originalEditorOnPaste = ed.onPaste;
|
||||
ed.onPaste = this.onPaste.bind(this);
|
||||
this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
|
||||
this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
|
||||
this.$onPasteHandler = ed.addEventListener('paste', this.onPaste.bind(this));
|
||||
this.selectionFix(ed);
|
||||
this.statusMessage(true);
|
||||
}
|
||||
|
||||
this.deactivate = function(reset) {
|
||||
this.cancelSearch(reset);
|
||||
this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
var ed = this.$editor;
|
||||
ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
if (this.$mousedownHandler) {
|
||||
this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
|
||||
ed.removeEventListener('mousedown', this.$mousedownHandler);
|
||||
delete this.$mousedownHandler;
|
||||
}
|
||||
this.$editor.onPaste = this.$originalEditorOnPaste;
|
||||
ed.onPaste = this.$originalEditorOnPaste;
|
||||
this.message('');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue