Closed
Bug 571352
Opened 15 years ago
Closed 15 years ago
<select multiple> does not reset the anchor <option> properly when the anchor is removed
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla2.0b1
People
(Reporter: fryn, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: testcase)
Attachments
(2 files)
|
999 bytes,
text/html
|
Details | |
|
5.84 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
When selecting a range of <option> elements from a <select multiple> and then removing the anchor of that selection range, the anchor is moved to the previous <option> element, which often results in unexpected behavior.
*** This bug is probably not limited to just <select multiple> elements, but I have not had the time to investigate. If you would like to, please do! ***
Steps to reproduce:
1. Open up the simple testcase attached to this bug.
2. Click the <option> labelled 1.
3. Shift+click the <option> labelled 4. (Options 1-4 are now selected.)
4. Click the button labelled "Remove...". (Options 2-4 are now selected.)
5. Shift+click the <option> labelled 5.
Expected results:
Options 2-5 are now selected, because the anchor element should be been set to the closest <option> element inside the selection range (which is option 2 in this case).
Actual results:
Options 0,2-5 are now selected.
Notes:
While WebKit does not have this exact bug, it does has non-intuitive behavior of this writing. To demonstrate in Webkit: click option 5; then shift+click option 2; then remove option 5; then shift+click option 1. Now options 1 and 2 are selected. Why? WebKit resets the anchor to the first/top (rather than closest) element in the selection range.
| Assignee | ||
Comment 1•15 years ago
|
||
Preserving the anchor..focus direction and range so that includes the same
options (except for the removed one), as before the removal seems reasonable.
Assignee: nobody → matspal
Keywords: testcase
| Assignee | ||
Comment 2•15 years ago
|
||
Attachment #450852 -
Flags: review?(bzbarsky)
Comment 3•15 years ago
|
||
Comment on attachment 450852 [details] [diff] [review]
Patch rev. 1
r=bzbarsky
Attachment #450852 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 4•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
You need to log in
before you can comment on or make changes to this bug.
Description
•