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.
Created attachment 245160 [details]
external instance data
external instance data for the testcase
Created attachment 245161 [details]
The following appears in the error console:
Error: parent has no properties
Source File: chrome://xforms/content/select1.xml
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.
Created attachment 255965 [details]
Getting some bad behavior from select, too.
(In reply to comment #5)
> Created an attachment (id=255965) [details]
> 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.
Created attachment 256123 [details] [diff] [review]
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.
checked into trunk
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.
Created attachment 261189 [details] [diff] [review]
patch for 1.8 and 1.8.0
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.
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16