Closed
Bug 299961
Opened 19 years ago
Closed 18 years ago
multiple option selection not possible with recreated mouse events
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: carglue, Unassigned)
References
(Depends on 1 open bug)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Build Identifier: Using javascript-created mouse events, I am unable to recreate the effect of a user selecting multiple options as is typical when the user holds the ctrl or shift key down and selects multiple items or a range of items from the list. Reproducible: Always Steps to Reproduce: In a Javascript/XUL extension, I initialize and create 2 mouse 'click' events targeted at 2 separate OPTION elements of a SELECT tag, where the first click event selects the first option and the second click event targets the second option but also has either the shiftKey or ctrlKey boolean flag set. Actual Results: The result is that it will not select multiple OPTION elements, either individually or as a range as expected. Only one element is ever selected (highlighted). Of course, it is possible to recreate the effect of multiple selection manually using a brute-force technique of watching for an onChange event on a SELECT element then saving the selection state of each of its OPTION elements; This saved-state data could then be used to set the state of each individual OPTION element at a later time. But this is not an ideal solution. Expected Results: I expected to see multiple options selected (or a range), just as if I had selected them interactively with my mouse. I would like to select a range of items (or multiple items) using only recreated mouse click events, not by programatically setting the .selected state of each option. It would seem useless to design an initMouseEvent call that accepts boolean parameters such as ctrlKey and shiftKey but yet not have the event affect the UI in the expected manner.
Comment 1•19 years ago
|
||
Please attach a testcase? Based on looking at the code, this should work...
Comment 2•18 years ago
|
||
No reply and no testcase for over 18 months. Resolving as WORKSFORME Reporter, you may reopen the bug if you can provide a testcase that fails in a trunk nightly build
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Updated•17 years ago
|
Flags: in-testsuite?
Comment 3•17 years ago
|
||
Note that for this to work right on trunk the events have to have the right coordinates, etc.
You need to log in
before you can comment on or make changes to this bug.
Description
•