User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
I get invalid selection when I select items in the following way. Let m<i<n is
indexes of listitems
Steps to Reproduce:
1. Select m item
2. Select n item keeping shift key
3. Select i item
4. Select n item keeping shift key
Indexes of selected items evaluate from m to n.
If we replace m by n in this algorithm (note: m<i<n) then selection is wrong
(also from m to n).
Created attachment 164692 [details]
Indexes of selected items should evaluate from i to n.
Anyone fixing this might consider looking at tree.xml and nsTreeSelection.cpp
seems to be a "live" value in listbox.xml to me, I will check and test
I guess we have three multiple selection implementations, for <html:select>
<xul:tree> and <xul:listbox>, and they need to all work the same way...
Updated URL for a data: html|select textcase (html trans -- quirks; in this case)
If someone can create a testcase for xul|tree I will look into it as well, I
dont know our xul tree code well enough.
Created attachment 166360 [details]
So on the face of it it looks like the code paths used by <select> and <tree>
are correct, at least in this case.
hmm, my minor (potential) fix did not work in my FF build, from current aviary
tree...I'll investigate further I suspect later on.
Created attachment 198305 [details] [diff] [review]
reset _selectionStart more often
This patch should correctly reset _selectionStart whenever addItemToSelection
and removeItemFromSelection are called outside of range selecting code (with
the minor exception of toggleItemSelection which might be considered syntactic
sugar for the other two).
Not going to block 1.8.1 for this bug.
This fix has been included together with the changes in bug 298371. -> FIXED