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

Bug 386053

Summary: [Text] setFocus does not work under some constellation
Product: [RT] RAP Reporter: David Casas <david.kasas>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: rsternberg, sgouta2, tbuschto
Version: 1.5   
Target Milestone: 2.0 M1   
Hardware: All   
OS: All   
Whiteboard: sr152

Description David Casas CLA 2012-07-26 10:39:42 EDT
Build Identifier: 20120625-0113

The setFocus ability on a Dialog only works on a Chrome Browser. You can reproduce click on LoginDialog in http://rap.eclipsesource.com/rapdemo/examples#dialog to check it.

Reproducible: Always

Steps to Reproduce:
1. Create a custom dialog with some Text Composites
2. Try to fix the focus in one of them
3. Deploy the app and show the dialog (it will only have a focus on Chrome Browser)

You can use the LoginDialog code form the eclipse rap demo plugin.
Comment 1 Ivan Furnadjiev CLA 2012-07-26 11:00:34 EDT
Change the priority to P1 as this is a regression. The underling input field does not gain the focus, because in BasicText.js#_visualizeFocus qx.event.handler.FocusHandler.blockFocus is true. Reproducible with Examples Demo and Controls Demo -> Dialogs under all browsers but Chrome.
Comment 2 Ivan Furnadjiev CLA 2012-07-27 04:17:48 EDT
If I remove the animation from Shell-DisplayOverlay the problem is gone.
Comment 3 Tim Buschtoens CLA 2012-07-27 04:23:30 EDT
I suspected this also. The focus should be set after the animation finished, not yet sure why that doesnt happen.
Comment 4 Ivan Furnadjiev CLA 2012-07-27 04:27:05 EDT
So... for now (and RAP 1.5) the workaround is to set the Shell-DisplayOverlay animation to none:
Shell-DisplayOverlay {
  animation: none;
}
Comment 5 David Casas CLA 2012-07-27 04:37:04 EDT
Yo can leave the animation out and it is working fine too...at least on firefox
  animation: fadeOut 400ms ease-out;

Cheers
Comment 6 Tim Buschtoens CLA 2012-07-30 10:08:25 EDT
Fixed with commit b6504e2c21733c44ea69241b46a049a0583cdf38.

There was a mechanism in place that was supposed to set the focus after the appear animation was done. This was meant for a shell appear animation, not the overlay. While trying to fix the issue, i realised that the entire mechanism was way to error-prone for such a cosmetic feature, so i removed it. Focus is now set at once. As a result, it's now theoretically possible to interact with a shell that's not yet fully visible.
Comment 7 Ivan Furnadjiev CLA 2012-08-14 05:01:20 EDT
*** Bug 387179 has been marked as a duplicate of this bug. ***
Comment 8 Ivan Furnadjiev CLA 2012-08-15 03:16:28 EDT
+1. I think that the fix is safe to be backported to 1.5 branch.
Comment 9 Ralf Sternberg CLA 2013-01-14 10:47:45 EST
+1
Comment 10 Ivan Furnadjiev CLA 2013-01-22 05:37:08 EST
Backported to 1.5-maintenance branch with commit 9ddaa4c7607321754471c8723bf852fd49595ddf.