Closed
Bug 360188
Opened 18 years ago
Closed 18 years ago
select1 keyboard navigation problems
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: aaronr, Assigned: aaronr)
Details
(Keywords: fixed1.8.0.12, fixed1.8.1.4)
Attachments
(5 files)
It is possible to get xf:select1 in such a state that it will not allow keydown or keyup navigation. It seems to be an issue with replacing/rebuilding the instance the select1 binds to when it contains a xf:itemset.
The following appears in the error console:
Error: parent has no properties
Source File: chrome://xforms/content/select1.xml
Line: 354
The problem is with the rebuild. At the point of xforms-ready, select1 has a selected item which lives in the itemset. The rebuild is causing the xf:itemset to remove its old content and repopulate with new xf:items. And when it does this, then select1 is refreshed, but since the currently selected item (the one itemset removed) already has the correct value, we think we are saving ourselves a lot of work and we just return. So this._selected will always be the old, removed item. Any function that then tries to use the DOM based of this selected item will run into troubles since the item no longer lives in the DOM. That is why we are getting the "parent has no properties" error.
The way to fix this is probably to clear the select/select1's cache of selected value(s) when xf:itemset is refreshed. That should be safe because anytime this happens, we should force the select/select1 to refresh again. I'll work on this fix.
Assignee: xforms → aaronr
(In reply to comment #5)
> Created an attachment (id=255965) [details]
> testcase2
>
> Getting some bad behavior from select, too.
>
unrelated problem, but I'll fix it in this patch, too, since the fix is minor. Problem is that the new removeNativeElm() method had some bugs in it.
I fixed this using the mutation handler that alex put in select1.xml. If we detect that an item is getting removed, we check to see if it is the currently selected item. If it is, then we'll null it out so that it isn't remembered when select1 refreshes the next time.
Attachment #256123 -
Flags: review?(surkov.alexander)
Attachment #256123 -
Flags: review?(doronr)
Updated•18 years ago
|
Attachment #256123 -
Flags: review?(surkov.alexander) → review+
Updated•18 years ago
|
Attachment #256123 -
Flags: review?(doronr) → review+
checked into trunk
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
crap, looks like this patch won't work on FF2. I never see the DOMNodeRemoved handler firing. Maybe this was fixed by bug 367164, but that never made it into the branches.
Assignee | ||
Comment 10•18 years ago
|
||
this patch works around the limitation of DOMNodeRemoved not working on the branch. This approach won't be needed once we do the performance re-write where itemset insertions and deletions of items will be handled much cleaner.
Assignee | ||
Comment 11•18 years ago
|
||
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16
Keywords: fixed1.8.0.12,
fixed1.8.1.4
Whiteboard: xf-to-branch
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•