Last Comment Bug 725581 - caretOffset for textarea should be -1 when textarea doesn't have a focus
: caretOffset for textarea should be -1 when textarea doesn't have a focus
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla13
Assigned To: alexander :surkov
:
Mentors:
Depends on:
Blocks: texta11y
  Show dependency treegraph
 
Reported: 2012-02-08 23:32 PST by alexander :surkov
Modified: 2012-02-13 09:10 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (5.18 KB, patch)
2012-02-08 23:34 PST, alexander :surkov
tbsaunde+mozbugs: review+
Details | Diff | Splinter Review

Description alexander :surkov 2012-02-08 23:32:21 PST
when document is focused but textarea is not then caretOffset on textarea returns the focus position of selection.
Comment 1 alexander :surkov 2012-02-08 23:34:47 PST
Created attachment 595669 [details] [diff] [review]
patch

new portions of ifs unfortunately
Comment 2 alexander :surkov 2012-02-08 23:35:33 PST
note, the patch enables tests disabled in bug 510128
Comment 3 alexander :surkov 2012-02-08 23:36:34 PST
(In reply to alexander :surkov from comment #2)
> note, the patch enables tests disabled in bug 510128

and I think this bug is a fix for bug 510128
Comment 4 Marco Zehe (:MarcoZ) 2012-02-08 23:51:02 PST
Comment on attachment 595669 [details] [diff] [review]
patch

Nice to get rid of that todo!
Comment 5 alexander :surkov 2012-02-09 23:19:38 PST
some details:
Since elements like input or textarea has own selection controller then selection we get is different from documents one. Since selection is turned into caret position then we can get result different from -1 for these controls if document is focused (see eContainedByFocus check in nsHyperTextAccessible::GetCaretOffset).
Comment 6 Trevor Saunders (:tbsaunde) 2012-02-10 00:43:25 PST
Comment on attachment 595669 [details] [diff] [review]
patch

its kind of weird but I think this makes sense.  We should look at ways to make the check if we're focusable faster.
Comment 7 Marco Bonardo [::mak] 2012-02-13 09:10:26 PST
https://hg.mozilla.org/mozilla-central/rev/c646a6e4dd2e

Note You need to log in before you can comment on or make changes to this bug.