Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 487218

Summary: CodeEdit renders incorrectly after traversing out and back in
Product: [ECD] Orion Reporter: Carolyn MacLeod <Carolyn_MacLeod>
Component: EditorAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Carolyn MacLeod CLA 2016-02-04 07:15:12 EST
This problem seems to require a very specific set of steps:
In Firefox, go to http://libingw.github.io/OrionCodeEdit/
1) Start with focus in the CodeEdit widget
2) Type Ctrl+M (this changes the mode of the Tab key to "traversal" instead of "insert a tab into the text")
3) Type Ctrl+F to open the Find dialog
4) Type ESC to close the Find dialog
5) Type Shift+Tab to traverse (backwards) out of the CodeEdit widget
6) Type Tab to traverse back in
The CodeEdit is shifted to the left, and clipped. I don't know how to shift it back (scrolling doesn't help), so I have to refresh the page.

I tried eliminating steps 3-4 (open/close Find dialog) and the problem did not occur, so it has something to do with the Find dialog being created.
Comment 1 Carolyn MacLeod CLA 2016-02-04 08:27:14 EST
I tried this a bit more, including on Chrome and IE.
Here's some notes:
- The left-shifted rendering problem happens on IE also (slightly differently)
- The shifting problem doesn't happen on Chrome, but I noticed that after you dismiss the Find dialog, the "tab stops" for it are still there. So, for example, before you create the Find dialog, Shift+Tab takes you directly to the browser's address bar. But after the Find dialog was created (and closed) it takes way more Shift+Tab keys to get to the address bar.
- In Firefox, I noticed that if you do the 6 steps, then do the following 2 steps, the CodeEdit widget keeps shifting further to the left each time:
7) Click (using the mouse) on the address bar
8) Type Tab until the CodeEdit widget has focus again
Comment 2 libing wang CLA 2016-02-05 09:12:13 EST
The text find dialog used in the code edit widget is the textView built-in one.
The "hidden" state of the dialog was done in a tricky way: It was shifted to the (-1000px, -50px) against the editor parent DIV origin. That is why when you use tab key, all the controls inside the dialog is still counted even though you cant see them.
I tried in the browser css inspector:
1. Remove the shifting of the dialog but instead put "display: none".
2. Use tab key now, the controls in the dialog are no longer counted.
3. The steps in FF never hit the issue again.
Comment 3 libing wang CLA 2016-02-08 15:34:27 EST
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=a5b582d126386a35907b86ff786fd0e136b29d64.
Please download the next codeEdit I-build to verify.
Comment 4 Carolyn MacLeod CLA 2016-02-10 19:10:13 EST
Verified.