Closed Bug 1062016 Opened 10 years ago Closed 10 years ago

[AccessFu] Editing state does not remain consistent with focused state of entry

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox34 --- fixed
firefox35 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

STR:

1. Open UI tests app, go to keyboard section.
2. Navigate to first entry.
3. Double tap - entry gets focus and keyboard pops up.
4. Swipe left to previous item - entry blurs and keyboard goes away.
5. Swipe right, back to entry.
6. Double tap - entry gets focus and keyboard pops up.
7. Swipe left.

Result: Entry does not lose focus, keyboard stays.
Expected: Entry should blur, just like in step 4.
This bug shows up in the main homescreen search field in gaia. I believe.
Attachment #8485937 - Flags: review?(yzenevich)
Comment on attachment 8485937 [details] [diff] [review]
Editing state gets out of sync.

Review of attachment 8485937 [details] [diff] [review]:
-----------------------------------------------------------------

r=me, tested on device and it's great!

::: accessible/jsat/EventManager.jsm
@@ +279,5 @@
> +    let accText, characterCount;
> +    let caretOffset = aCaretOffset;
> +    try {
> +      accText = acc.QueryInterface(Ci.nsIAccessibleText);
> +    } catch (e) {}

Nit: a comment would be helpful.

@@ +281,5 @@
> +    try {
> +      accText = acc.QueryInterface(Ci.nsIAccessibleText);
> +    } catch (e) {}
> +
> +    if (accText) {

lines 286-288 can go in try and you can avoid checking if (accText) {...}

@@ +295,5 @@
> +    let editState = {
> +      editing: state.contains(States.EDITABLE) &&
> +        state.contains(States.FOCUSED),
> +      multiline: state.contains(States.MULTI_LINE),
> +      atStart: caretOffset == 0,

When comparing to 0 use '==='.
Attachment #8485937 - Flags: review?(yzenevich) → review+
https://hg.mozilla.org/mozilla-central/rev/34a6c6248521
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment on attachment 8485937 [details] [diff] [review]
Editing state gets out of sync.

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]: All sorts of issues arise for braille users on Android where they can't navigate pages, and B2G screen reader users where the keyboard becomes useless.
[Describe test coverage new/current, TBPL]: Added mochitests.
[Risks and why]: Medium risk since this is not entirely trivial, but we actually have tests for this now, which is better than before.
[String/UUID change made/needed]: None.
Attachment #8485937 - Flags: approval-mozilla-aurora?
Comment on attachment 8485937 [details] [diff] [review]
Editing state gets out of sync.

Aurora+
Attachment #8485937 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Depends on: 1069877
You need to log in before you can comment on or make changes to this bug.