Closed Bug 687573 Opened 13 years ago Closed 13 years ago

Orion does not maintain X offset when navigating vertically

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 10

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

(Whiteboard: [sourceeditor][orion])

STR:

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.clientTop;
  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...
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.
...err, ends up at the end of the 6th line when I press down 4 times.
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
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:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=360672
This is now fixed upstream. Will be fixed for Mozilla once bug 697407 lands.
Depends on: 697407
This is now fixed by bug 697407. QA will verify.
Status: NEW → RESOLVED
Closed: 13 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
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.