Closed
Bug 981652
Opened 11 years ago
Closed 11 years ago
Dispatch "select" events from HTMLInputElement/HTMLTextAreaElement.setSelectionRange() and selection setters
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 2 obsolete files)
This is basically reverting the fix to bug 924069 with bug 931904 fixed.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8388555 -
Flags: review?(bugs)
Comment 2•11 years ago
|
||
Comment on attachment 8388555 [details] [diff] [review]
Dispatch "select" events from HTMLInputElement/HTMLTextAreaElement.setSelectionRange() and selection setters; r=smaug
Doesn't this mean that we won't dispatch select for display: none case, like
we currently do.
Attachment #8388555 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 3•11 years ago
|
||
Ah, that's a very good point. I'll fix up the patch.
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8388889 -
Flags: review?(bugs)
Comment 5•11 years ago
|
||
Comment on attachment 8388889 [details] [diff] [review]
Dispatch "select" events from HTMLInputElement/HTMLTextAreaElement.setSelectionRange() and selection setters; r=smaug
You didn't fix HTMLTextAreaElement::SetSelectionRange, only
HTMLInputElement::SetSelectionRange
Attachment #8388889 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8388889 [details] [diff] [review]
Dispatch "select" events from HTMLInputElement/HTMLTextAreaElement.setSelectionRange() and selection setters; r=smaug
My bad!
Attachment #8388889 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8388992 -
Flags: review?(bugs)
Comment 8•11 years ago
|
||
Comment on attachment 8388992 [details] [diff] [review]
Dispatch "select" events from HTMLInputElement/HTMLTextAreaElement.setSelectionRange() and selection setters; r=smaug
Oh, crap, this code is just broken. SetSelectionRange really
doesn't handle the case when we don't have a frame.
Currently SetRangeText on textarea doesn't end up dispatching "select" since
SetSelectionRange throws NS_ERROR_FAILURE, but input does dispatch, since its
SetSelectionRange doesn't throw.
At least we need to make input and textarea work consistently, even better
would be to fix both to work per the spec.
Attachment #8388992 -
Flags: review?(bugs)
Assignee | ||
Comment 9•11 years ago
|
||
As discussed on IRC, nsTextEditorState has the concept of a selection cache which is used to save the selection offsets and the selection direction when we reframe a text control, but we currently have nothing to store the selection information when we start off without a frame. I have filed bug 982145 to get that more general problem fixed.
Depends on: 982145
Assignee | ||
Updated•11 years ago
|
Attachment #8388555 -
Flags: review- → review?(bugs)
Assignee | ||
Updated•11 years ago
|
Attachment #8388992 -
Attachment is obsolete: true
Updated•11 years ago
|
Attachment #8388555 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 10•11 years ago
|
||
Comment 11•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•