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

Bug 277444

Summary: JavaScript error in IE when using setSelection on a ComboViewer with setEnabled is false
Product: [RT] RAP Reporter: Christian <christian.hoesel>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: ivan
Version: 1.2   
Target Milestone: 1.2 RC2   
Hardware: PC   
OS: Windows All   
Whiteboard: qx-open
Attachments:
Description Flags
Example for reproducing
none
Proposed patch. ivan: review?

Description Christian CLA 2009-05-22 07:18:02 EDT
Build ID: 1.2 RC1

When using the setSelection Method on a ComboViewer with the setEnabled flag set to false IE8 shows up a Javascript error. FF and Safari which both work fine and do not show up this error. Unfortunately
the error message is in german:
"Could not evaluate javascript response:
Das Steuerelement kann den Fokus nicht erhalten, da dieses unsichtbar
oder nicht aktiviert ist oder keinen Fokus zulässt. ..."
This means something like - the widget cannot obtain the focus, because
it is not visible, not activated or it does not allow any focus. First time I saw this error on RAP 1.2M7 but RC1 shows the same behaviour and there is no difference between debug and the standard qx variant.
I append an example which demostrates this issue.
Comment 1 Christian CLA 2009-05-22 07:19:08 EDT
Created attachment 136799 [details]
Example for reproducing
Comment 2 Ivan Furnadjiev CLA 2009-05-22 08:03:03 EDT
I've opened a qooxdoo bug:
selectAll() of disabled TextField leads to error in IE
http://bugzilla.qooxdoo.org/show_bug.cgi?id=2407
Comment 3 Ivan Furnadjiev CLA 2009-05-22 08:09:53 EDT
Created attachment 136801 [details]
Proposed patch.

This patch checks for text field enablement before calling focus() in qooxdoo TextField#selectAll().
Comment 4 Ralf Sternberg CLA 2009-05-25 04:20:33 EDT
+1 to apply the patch to qx build.
We should also add the keyword RAP and the bug # to the comment in the patch.
Comment 5 Ivan Furnadjiev CLA 2009-05-25 07:24:45 EDT
Changes are in CVS HEAD.