Orion does not maintain X offset when navigating vertically

RESOLVED FIXED in Firefox 10


7 years ago
5 months ago


(Reporter: Ehsan, Unassigned)


Firefox 10

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [sourceeditor][orion])



7 years ago

1. Paste this into scratch pad:

XPCOMUtils.defineLazyGetter(window, "gFindBar", function() {
  let XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
  let findbar = document.createElementNS(XULNS, "findbar");
  findbar.id = "FindToolbar";

  let browserBottomBox = document.getElementById("browser-bottombox");
  browserBottomBox.insertBefore(findbar, browserBottomBox.firstChild);

  // Force a style flush to ensure that our binding is attached.
  findbar.browser = gBrowser;
  window.gFindBarInitialized = true;
  return findbar;

Make sure that the width of the scratchpad window is small enough for there to be a vertical scrollbar.
2. Put the caret at the end of the second line by scrolling the view horizontally.
3. Press down 4 times.  The caret should end up at the end of the "let browserBottomBox" line...

Comment 1

7 years ago
I'm unable to reproduce this. In step 3, I always end up with the caret at the end of the "let browserBottomBox" line, no matter what the size of the window is.

In step 2, I'm scrolling horizontally and clicking at the end of the line (or pressing the keys to get to the end of the line).

Whichever way I get the caret to the end of the second line, the caret always ends up at the end of the 6th line.

Comment 2

7 years ago
...err, ends up at the end of the 6th line when I press down 4 times.

Comment 3

7 years ago
You should make sure that the scrollbar is moved towards the right.  FWIW, I saw this on Mac, but I doubt that it's platform specific.
This is a bug in Orion (Scratchpad just happens to use it). Marking this as a Mac bug, until we get to triage this and see if it's platform specific or not.

Ehsan, thanks for the report!
OS: Linux → Mac OS X
Summary: Scratchpad does not maintain X offset when navigating vertically → Orion does not maintain X offset when navigating vertically
Whiteboard: [sourceeditor][orion]
Confirmed on Linux, and it happens with the latest Orion upstream.

The caret location at step 3 depends on the scrollbar location at step 2.

Kevin: did you file a bug upstream for this?
OS: Mac OS X → All
Hardware: x86_64 → All
Version: unspecified → Trunk

Comment 6

7 years ago
I was able to reproduce this bug just now (I ensured that I had both vertical and horizontal scrollbars... I don't remember if I had done that before).

Filed upstream:

This is now fixed upstream. Will be fixed for Mozilla once bug 697407 lands.


7 years ago
Depends on: 697407
This is now fixed by bug 697407. QA will verify.
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
This is VERIFIED on Build identifier: Mozilla/5.0 (X11; Linux i686; rv:10.0a1) Gecko/20111102 Firefox/10.0a1


5 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.