Open
Bug 1327825
Opened 8 years ago
Updated 2 years ago
Ctrl+Selection in <select multiple> is confusing
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
NEW
People
(Reporter: arni2033, Unassigned)
Details
>>> My Info: Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1]
2. Click on "Option 1"
3. Hold Ctrl, hover mouse over "Option 3", hold left mouse button
4. Move mouse to "Option 9", then to "Option 5", then to "Option 9" again
("First I wasn't sure I want all options from 3 to 9, but now I'm sure")
AR: Selected options: 1, 3,4, 6,7,8
ER: Selected options: 1, 3,4,5,6,7,8,9
STR_2: (reference of good behavior)
1. Open url [1]
2. Click on "Option 1"
3. Hold Ctrl, hover mouse over "Option 3", hold left mouse button, move mouse to "Option 9"
("I'm quite sure that I want all options from 3 to 9")
AR: Selected options: 1, 3,4,5,6,7,8,9 - just as expected
> [1] data:text/html,<select multiple="" size="9"><option>Option 1</option><option>Option 2</option><option>Option 3</option><option>Option 4</option><option>Option 5</option><option>Option 6</option><option>Option 7</option><option>Option 8</option><option>Option 9</option></select>
EXPLANATION:
I think that the difference between the set of selected options before Ctrl+selection and set of
selected options at a given time during selection should only depend on 3 things:
1) keyboard modifier (Ctrl) that were hold when user pressed left mouse button over an option
2) "Start" option that was located below mouse pointer when user pressed left mouse button
3) "End" option that is currently located below mouse pointer (mouse position in list of options)
As you can see, STR_2 is not well defined, what makes it unpredictable. In fact, Firefox doesn't
follow (1), what makes STR_2 even more unpredictable (really unpredictable things happen if user
releases Ctrl key during selection). I'm not sure if I need a separate bug report for that, but let's
assume for now that in all scenarios user holds all modifiers until the end of selection.
I have 2 suggestions of logical behavior that ensures that (2),(3) are met. Possibly there're others.
X is closer to what Firefox does, Y is what GoogleChrome does.
X) Ctrl+Selection should preserve all selection that already exists, and then
Invert options that are placed between "Start" and "End" options, inclusive
Y) Ctrl+Selection should preserve all selection that already exists, and then perform a "one-way
selection" of options that are placed between "Start" and "End" options, inclusive.
"One-way selection" is:
If "Start" option was selected before mousedown, then all said options should become not selected.
If "Start" option wasn't selected before mousedown, then all said options should become selected.
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Updated•8 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•