Closed
Bug 452161
Opened 16 years ago
Closed 16 years ago
pyatspi insertText doesn't work in empty textboxes
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: tacone, Assigned: surkov)
References
Details
Attachments
(1 file, 1 obsolete file)
13.99 KB,
patch
|
aaronlev
:
review+
MarcoZ
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1 Hello all, I've come to a strange behaviour with Firefox (3.0.1) and pyatspi. Atspi's insertText() works normally on textareas, but seems to only work on textboxes (<input type="text" />) when they're not empty. Can anyone confirm this behaviour and suggest a workaround ? Reproducible: Always Steps to Reproduce: 1. find a webpage with a texbox (google, yahoo or better more simpler non-javascript-enabled websites) 2. open Accerciser and inspect the textbox (focus the textbox in the browser and click ctrl+alt+a) 3. make sure the textbox doesn't contain text. if it does, delete the text at hand. 4. in the accerciser control type: acc.queryEditableText().insertText(0,'xxx',3) Actual Results: nothing. Expected Results: textbox gets populated with 'xxx' write just one letter in the textbox and everything will work just as expected.
Updated•16 years ago
|
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
QA Contact: disability.access → accessibility-apis
Version: unspecified → Trunk
Comment 1•16 years ago
|
||
Hi! Do you get any failure code back?
Reporter | ||
Comment 2•16 years ago
|
||
Marco: insertText() returns True as it always does. No failures of any kind, it just doesn't work.
Comment 3•16 years ago
|
||
Confirmed on Windows using AccProbe as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Assignee | ||
Comment 4•16 years ago
|
||
the problem we can't set caret position in empty textbox because HypertextOffsetsToDOMRange inSetSelectionBounds() fails because empty textbox hasn't any accessible children. the structure of html:input is: html:input html:div html:br
Comment 5•16 years ago
|
||
Alex, don't we create accessibles for <br>? I thought we did.
Comment 6•16 years ago
|
||
We don't create an accessible for the ghost <br> that exists merely because the editor implementation would be confused without *something* in an empty textbox.
Assignee | ||
Comment 7•16 years ago
|
||
(In reply to comment #6) > We don't create an accessible for the ghost <br> that exists merely because the > editor implementation would be confused without *something* in an empty > textbox. > it seems we are too, what if we will create accessible for this html:br?
Assignee | ||
Comment 8•16 years ago
|
||
Some of out methods of nsIAccessibleText will fail for empty textboxes for valid 0 offsets: ScrollSubstringTo, ScrollSubstringToPoint - use HypertextOffsetsToDOMRange GetText - uses GetPosAndText but I think they shouldn't.
Assignee | ||
Comment 9•16 years ago
|
||
I really afraid to change GetPosAndText so changing HypertextOffsetsToDOMRange, it sounds correct but not sure I like this hack.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #335518 -
Flags: review?(aaronleventhal)
Comment 10•16 years ago
|
||
> it seems we are too, what if we will create accessible for this html:br?
Then we are passing the confusion on to screen readers. An empty textbox should simply be empty. Zero length.
Assignee | ||
Comment 11•16 years ago
|
||
Aaron, do you like the patch approach?
Assignee | ||
Updated•16 years ago
|
Assignee | ||
Comment 12•16 years ago
|
||
this patch doesn't work with contentEditable because editor is created one for window, so it's not empty in this case, though I put an example, where the document is editable entirely. This approach works for it.
Attachment #335518 -
Attachment is obsolete: true
Attachment #335874 -
Flags: review?(aaronleventhal)
Attachment #335518 -
Flags: review?(aaronleventhal)
Assignee | ||
Updated•16 years ago
|
Attachment #335874 -
Flags: review?(marco.zehe)
Updated•16 years ago
|
Attachment #335874 -
Flags: review?(aaronleventhal) → review+
Comment 13•16 years ago
|
||
Comment on attachment 335874 [details] [diff] [review] patch nit: In the very first file, there's an edtior instead of an editor. Thanks for all the maintenance work!
Attachment #335874 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 14•16 years ago
|
||
checked in with Marco's comment. http://hg.mozilla.org/mozilla-central/index.cgi/rev/0b1b33454193
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•