| Summary: | IRunnableWithProgress does not correctly reset the focus | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Steffen <steffen> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ivan, oliver, steffen | ||||||
| Version: | 1.4 | ||||||||
| Target Milestone: | 1.5 M4 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Steffen
Created attachment 207824 [details]
Source-Snippet (Example)
I can reproduce all your findings. Chrome is working as expected too. After a short investigation I found the following:
1. Firefox first Enter down does not work issue - this is related to the workaround in EventHandlerUtil.js#getEventPseudoTypes for not processing the first "keydown" in Firefox due to some Firefox bug in the past. First solution will be to remove this check if it is not necessary any more. Second (more as a workaround if first solution is not possible ) - move the code that sends widgetDefaultSelection in TextUtil.js from "_onKeyDown" to "_onKeyUp". Tim, what do you think?
2. Selection issue in Firefox is still under investigation.
3. IE focusing issue - when a focused text field (HTML input field) is disabled in IE the focus is transfered somewhere else. One possible solution will be to visualize the focus after the widget gets enabled again - in Widget.js#_applyEnabled add:
....
} else {
this.removeState("disabled");
if( this.getFocused() ) {
this._visualizeFocus();
}
}
...
But first, we have to check what is happening when a focused control is disabled in SWT.
I checked in SWT and the focused control loose the focus when it is disabled. In RAP the focused control didn't change. From the comment in the Control#setEnabled method it seems that this is a known issue in RAP. In SWT (Windows) Control#setEnabled there is some code related to fixing focus. Probably we should adopt this code in RAP too. Created attachment 208138 [details]
Patch that fixes the issue
This patch adopt the focus handling code in Control#setEnabled from SWT and remove the focus from disabled focused widget on the client.
Applied patch to CVS HEAD. All described issues have been fixed with this patch. (In reply to comment #6) > Applied patch to CVS HEAD. All described issues have been fixed with this > patch. I tried your patch with RAP-Version 1.4SR1 but i can still reproduce the described issues. (In reply to comment #7) > I tried your patch with RAP-Version 1.4SR1 but i can still reproduce the > described issues. Could you try it against CVS HEAD? When I have time I will test it against 1.4SR1. BTW... as the patch changes the javascript file Widget.js, are you sure that you are using the patched file for your tests? Did you rebuild the client.js or you are running your tests with "debug" library variant? (In reply to comment #9) > BTW... as the patch changes the javascript file Widget.js, are you sure that > you are using the patched file for your tests? Did you rebuild the client.js or > you are running your tests with "debug" library variant? This could be my failure. I will try it again. Ok, now everything works as expected. |