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

Bug 411693

Summary: [Chrome] Ctrl + mouse move causes editor focus to be lost
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: adrian.aichner, Silenio_Quarti
Version: 3.0   
Target Milestone: 4.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-06-26 10:57:51 EDT
Chrome 29.0.1547.0 (dev channel)

1. Open a .js file that contains block comment with a URL in it.
(For example, most Orion source files have http://eclipse.org in their license comment).
2. Use the mouse to select some text in the editor.
3. Press Ctrl.
4. Move the mouse slightly. This will cause the URL to turn into a clickable hyperlink.

However, the Orion editor immediately loses focus (your selection turns grey, and you get the default cursor instead of the I-beam). At this point, you cannot use the keyboard to interact with the editor anymore. The document.activeElement shows <body>. To get focus back, you need to move the mouse around, which causes the hyperlink to go away.

I often hit this bug this when trying to use Ctrl+X/Ctrl+C/Ctrl+V. If I don't keep the mouse perfectly still between pressing Ctrl and 'c', the hyperlink appears, the editor loses focus, and the action I was trying to perform does not happen.

Does not happen in Firefox.
Comment 1 Mark Macdonald CLA 2013-06-27 17:13:14 EDT
Actually, I can reproduce this on documents without hyperlinks, even on a plain text file. It is a side effect of holding Ctrl while moving the mouse cursor.

1. Open a file.
2. Select some text
3. Hold Ctrl, then move the mouse slightly.
4. Focus lost
Comment 2 Silenio Quarti CLA 2013-07-03 17:30:23 EDT
I cannot reproduce this with Chrome Version 28.0.1500.70 beta-m.  I will try the dev channel.
Comment 3 Mark Macdonald CLA 2013-07-03 18:49:32 EDT
(In reply to comment #2)
> I cannot reproduce this with Chrome Version 28.0.1500.70 beta-m.  I will try
> the dev channel.

The Canary channel also had this bug last time I checked.
Comment 4 Silenio Quarti CLA 2013-07-04 12:35:36 EDT
The focus is lost when the contentEditable flag is reset to show links. Setting tabIndex to zero fixes this problem on Chrome 29. The same problem happens on IE, but setting the tabIndex does not help.  On IE, I restore focus when the link mode is disabled.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=5574d8a5915c83f21309123ef4e6ab7c6d85c53b
Comment 5 Adrian Aichner CLA 2014-05-05 13:09:03 EDT
This bug is not solved for me.

Happens in canary Chrome, Firefox 29, nightly Firefox.

Hyperlinks do not works.

Cursor only returns in chrome after releasing Ctrl key.

In firefox I have to release the page to get the cursor back.

I have removed the codemirror plugin and still see the problem in HEAD of master.
Comment 6 Adrian Aichner CLA 2014-05-05 13:11:25 EDT
Sratch comment 5, this time without typos:

This bug is not resolved for me.

Happens in canary Chrome, Firefox 29, nightly Firefox.

Hyperlinks do not work.

Cursor only returns in Chrome after releasing Ctrl key.

In Firefox I have to reload the page to get the cursor back.

I have removed the codemirror plugin and still see the problem in HEAD of master.