Closed
Bug 452584
Opened 17 years ago
Closed 9 years ago
SetSelectionBounds fails to select content of html:input if it contains two text frames
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Whiteboard: [auto-closed:inactivity])
Attachments
(1 file)
|
4.08 KB,
patch
|
MarcoZ
:
review+
|
Details | Diff | Splinter Review |
nsIAccessibleEditText::deleteText doesn't work when end offset equals text length
for example, deleteText(0, 5) throws an exception if the input value is "hello".
| Assignee | ||
Comment 1•17 years ago
|
||
it seems the problem only after insertText. Also setTextContents() fails after insertText.
| Assignee | ||
Comment 2•17 years ago
|
||
actually SetSelectionBounds() fails to select content of html:input if it contains two frames. Eventually several calls of insertText creates two text frames inside html:input. In this case GetPosAndText returns wrong end frame and accessible and therefore HypertextOffsetsToDOMRange creates wrong range so that range->SetEnd(endNode, endOffset) fails.
Assignee: nobody → surkov.alexander
Summary: nsIAccessibleEditText::deleteText doesn't work when end offset equals text length → SetSelectionBounds fails to select content of html:input if it contains two text frames
| Assignee | ||
Comment 3•17 years ago
|
||
Attachment #335898 -
Flags: review?(aaronleventhal)
| Assignee | ||
Updated•17 years ago
|
Attachment #335898 -
Flags: review?(marco.zehe)
| Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
Updated•17 years ago
|
Attachment #335898 -
Flags: review?(marco.zehe) → review+
Comment 4•17 years ago
|
||
Did we run tests on this yet, and do we even have tests the try the various ways it's possible to use getTextAtOffset(), getTextBeforeOffset(), getTextAfterOffset().
For example, I think we used to return null for the startFrame on requests that go past the end. Do we still do that? If no I think it will probably break usages some of those methods at or near the end of a paragraph.
Did GetPosAndText() return end frame of null, and that caused the problem?
Comment 5•17 years ago
|
||
Comment on attachment 335898 [details] [diff] [review]
patch
Clearing request until questions answered.
Attachment #335898 -
Flags: review?(aaronleventhal)
| Assignee | ||
Comment 6•17 years ago
|
||
Actually that's I'm afraid of. Since we haven't any tests for this and I'm not sure I know entirely that code then I'm afraid to break something. We don't return empty end frame or accessible, we initialize them by start frame and start accessible (http://mxr.mozilla.org/mozilla-central/source/accessible/src/html/nsHyperTextAccessible.cpp#515). So I'm not sure how it can be used.
Comment 7•16 years ago
|
||
Ping.
I wonder about AccessibleEditableText.idl. Are the ranges really supposed to be from 0 .. length?
I would have thought 0 .. length-1.
| Assignee | ||
Comment 8•16 years ago
|
||
Perhaps, but the problem is methods do not work after several calls of InsertText
Comment 9•16 years ago
|
||
Maybe get Roc's thoughts?
| Assignee | ||
Comment 10•16 years ago
|
||
In general we shouldn't care how much text nodes are inside. If we'll fix this for html:input then we could easily get similar things for editable div for example. In general this is all related with text offset support which should be primary I think.
Comment 11•9 years ago
|
||
AUTO-CLOSED. This bug untouched for over 2000 days. Please reopen if you can confirm the bug and help it progress.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [auto-closed:inactivity]
You need to log in
before you can comment on or make changes to this bug.
Description
•