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

Bug 372835

Summary: [Combo] selectionLength reported as NaN, leading to immediate crash
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2012-02-29 05:56:48 EST
To reproduce, open the Combo tab in the controls demo and open the drop down of a combo.
-> HTTP 500: Not a valid integer number: NaN
Comment 1 Tim Buschtoens CLA 2012-02-29 06:07:02 EST
Seems to be a Firefox only issue, webkit and ie are fine. Also, other combos are fine, perhaps its because they have no content set?
Comment 2 Tim Buschtoens CLA 2012-02-29 07:59:25 EST
Fixed in CVS HEAD.

Not sure why it wasn't a problem before, but BasicText.js (formaly TextField.js) returned undefined for selectionStart if the value of the input element is "" in firefox.
Comment 3 Ivan Furnadjiev CLA 2012-02-29 08:23:43 EST
Before, there was a check for undefined in TextUtil.js#_handleSelectionChange for both selectionStart and selectionLength.
Comment 4 Tim Buschtoens CLA 2012-02-29 09:56:08 EST
yes, but that check still exists somewhere else and was not related to combo, which has its own check. Only THAT check doesnt work because the value is NaN, not undefined. Probably it was undfined before for some reason...