Bug 495841 - File changed event listener should not move the focus from the current editor.
Summary: File changed event listener should not move the focus from the current editor.
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Editor (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2016-06-09 19:28 EDT by Carolyn MacLeod CLA
Modified: 2016-06-13 10:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carolyn MacLeod CLA 2016-06-09 19:28:07 EDT
Go to: http://libingw.github.io/OrionCodeEditTern/
Wait until everything is loaded and the tooling shows errors and warnings.
Type F2 to bring up the tooltip for: 
"'import' and 'export' may appear only with 'sourceType: module'"
Notice that the "Set sourceType to module" button has focus (good).
Press either 'space' or 'Enter' key to activate the button (also good).

Focus jumps to the .tern-project file (not so good), and the tooltip is still open (it should close when the button is activated).
Comment 1 libing wang CLA 2016-06-10 08:19:23 EDT
Good catch, Car.
Actually this happens to Orion as well.

Create a new basic project. Then create a new js file and paste the same contents there. Create an empty .tern-project file as well.
Open both the js file and the .tern-project file in the split editors.
Now repeat your steps you will see exactly the same result.

RE: Focus jumps to the .tern-project file(not so good)
I know exactly the reason of this. The quick fix modified not only the js file but also added new rules to the .tern-project file. In the solution of bug 488582, the .tern-project editor smartly captured the "changed" event and refresh the contents. The focus is a side effect. In normal Orion dev cases we do not have two editors open so we do not always face the issue. Maybe in my demo case I should listen to the event again and kick the focus back to the top editor.

RE: the tooltip is still open.
This happens to single editor as well. Could you please open a bug against jstool?