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

Bug 252462

Summary: [Text] Changing selection on a hidden text widget causes exception in FF
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: b.muskalla, stefan.roeck
Version: 1.0   
Target Milestone: 1.2 M3   
Hardware: All   
OS: All   
Whiteboard: qx-closed
Bug Depends on:    
Bug Blocks: 247122    

Description Rüdiger Herrmann CLA 2008-10-28 14:10:18 EDT
Steps to reproduce:
* start controls demo in Firefox (at least version 3.0 shows this behavior)
* select the 'Text' tab
* enter 'abc' in the text field
* uncheck the 'Visible' check box
* change the selection by entering 1 in the 'select from' field and 2 in the 'to' field.
* click the 'Set' button
=> leads to the following exception
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLInputElement.selectionStart]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://127.0.0.1/rap?startup=controls :: anonymous :: line 16846"  data: no]

Filed a bug entry at qooxdoo:
  1519: Manipulating selection of hidden TextField leads to exception in FF
  http://bugzilla.qooxdoo.org/show_bug.cgi?id=1519
Comment 1 Rüdiger Herrmann CLA 2008-10-29 06:33:29 EDT
To avoid the client-side exception, selection changes are only sent tothe client if the text widget is visible.
See TextLCAUtil#writeSelection()

Changes are in CVS HEAD

I will leave this bug open until there is feedback from the qx team on whether there can be done something about this on the client side.
Comment 2 Rüdiger Herrmann CLA 2008-11-04 12:45:20 EST
The qooxdoo bug that blocks this bug ( http://bugzilla.qooxdoo.org/show_bug.cgi?id=1519 ) was closed, but only in that an error is raised if a selection is manipulated while the text field is invisible.

This makes the already committed workaround (see comment #1) a permanent solution.
Comment 3 Stefan Röck CLA 2009-07-22 09:11:50 EDT
This is also a problem for Safari because of Webkit bug https://bugs.webkit.org/show_bug.cgi?id=26344. Safari complete crashes if a hidden text field's selection is modified.
Comment 4 Benjamin Muskalla CLA 2009-07-22 09:26:09 EDT
Stefan, do you say this bug is not resolved or did you encounter the problem in an older RAP version?
Comment 5 Stefan Röck CLA 2009-07-22 12:03:38 EDT
No, in CVS Head this bug is fixed. I just wanted to add another aspect of this bug if there's someone who runs an older version of RAP, as we do (1.1.2 at the moment). Thanks for asking :-)