mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 03:54:35 +00:00
Bug 957259 - Error: "TypeError: caretPos is null" in SelectionHandler.js @ line: 585, r=margaret
This commit is contained in:
parent
9fcca9708f
commit
2b61a6e620
@ -541,6 +541,10 @@ var SelectionHandler = {
|
||||
// in editable targets. We should factor out the logic that's currently in _sendMouseEvents.
|
||||
let viewOffset = this._getViewOffset();
|
||||
let caretPos = this._contentWindow.document.caretPositionFromPoint(aX - viewOffset.x, aY - viewOffset.y);
|
||||
if (!caretPos) {
|
||||
// User moves handle offscreen while positioning
|
||||
return;
|
||||
}
|
||||
|
||||
// Constrain text selection within editable elements.
|
||||
let targetIsEditable = this._targetElement instanceof Ci.nsIDOMNSEditableElement;
|
||||
|
Loading…
Reference in New Issue
Block a user