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

Bug 385331

Summary: Need to show selection when editor loses focus
Product: [ECD] Orion Reporter: Adam Peller <apeller>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Silenio_Quarti
Version: 0.5   
Target Milestone: 1.0 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
fake selection none

Description Adam Peller CLA 2012-07-17 13:14:05 EDT
Now that the editor is no longer in an iframe, applications which embed it (like Maqetta) will steal the focus and selection when another part of the web page is activated.  Putting the iframe back, either on the Orion or the application side, doesn't seem to be workable. Silenio and I spoke about this, and he thinks the only solution is to 'fake' a selection at the blur event by drawing a background color on the text (possibly changing the foreground color as well)  On focus, the real selection will be restored.

This is a critical bug for Maqetta.
Comment 1 Silenio Quarti CLA 2012-07-19 11:02:04 EDT
I released changes that will draw a grayed out selection background when the editor is not in focus. This only happens when the editor is in full selection mode.  The fake selection draws the foreground (text) colored instead of the usual selection color (white).  It looks to ok to me, so I will leave it like that. I will attach a screenshot.

Adam, please give it a try. Thanks!

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=593c639243c846175242cbb711bdecf73b5df80b
Comment 2 Silenio Quarti CLA 2012-07-19 11:02:29 EDT
Created attachment 218933 [details]
fake selection