diff --git a/mobile/android/chrome/content/SelectionHandler.js b/mobile/android/chrome/content/SelectionHandler.js index 7f5f920370c2..bc54a57cf0e2 100644 --- a/mobile/android/chrome/content/SelectionHandler.js +++ b/mobile/android/chrome/content/SelectionHandler.js @@ -783,7 +783,8 @@ var SelectionHandler = { let textBounds = range.getBoundingClientRect(); // Get rect of editor - let editorBounds = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_EDITOR_RECT, 0, 0, 0, 0); + let editorBounds = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_EDITOR_RECT, 0, 0, 0, 0, + this._domWinUtils.QUERY_CONTENT_FLAG_USE_XP_LINE_BREAK); // the return value from sendQueryContentEvent is in LayoutDevice pixels and we want CSS pixels, so // divide by the pixel ratio let editorRect = new Rect(editorBounds.left / window.devicePixelRatio, @@ -996,7 +997,8 @@ var SelectionHandler = { if (this._activeType == this.TYPE_CURSOR) { // The left and top properties returned are relative to the client area // of the window, so we don't need to account for a sub-frame offset. - let cursor = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_CARET_RECT, this._targetElement.selectionEnd, 0, 0, 0); + let cursor = this._domWinUtils.sendQueryContentEvent(this._domWinUtils.QUERY_CARET_RECT, this._targetElement.selectionEnd, 0, 0, 0, + this._domWinUtils.QUERY_CONTENT_FLAG_USE_XP_LINE_BREAK); // the return value from sendQueryContentEvent is in LayoutDevice pixels and we want CSS pixels, so // divide by the pixel ratio let x = cursor.left / window.devicePixelRatio;