Closed Bug 352205 Opened 18 years ago Closed 17 years ago

Caret move event after text delete without actually moving caret

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: parente, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file, 2 obsolete files)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060911 Minefield/3.0a1

The sequence of events for pressing "Backspace" in a gtk text field is the following:

object:text-changed:deleted (character is removed)
object:text-caret-moved (caret moves back one position)

The sequence of events for pressing "Delete" in a gtk text field is the following:

object:text-changed:deleted (character is removed)
(no other event, caret remains where it is)

Firefox mimicks the gtk event sequence for "Backspace" but not for "Delete." For "Delete," FF inserts an extra move event:

object:text-changed:deleted (character is removed)
object:text-caret-moved (caret doesn't actually move, event has same offset as where the caret was previously)

For consistency, FF should probably mimick gtk if possible. No move event should be fired since the caret doesn't actually move in the "Delete" case.
Hmm, we might need to have an extra member variable for that. Either a "swallow next caret move event" or a "mLastCaretPosition" to compare with.
Blocks: newatk
Severity: normal → minor
Assignee: aaronleventhal → nobody
Blocks: keya11y
No longer blocks: newatk
Blocks: texta11y
No longer blocks: keya11y
Blocks: lsr
We could store the last caret position and hypertext accessible in nsCaretAccessible, and suppress the caret-move event when it doesn't change.
Note: that would prevent 2 caret move events if the user did something like press Home or End twice in a row.

Perhaps that's desirable? It's what I see in gedit.
Attached patch Minor correction, same idea (obsolete) — Splinter Review
Attachment #261831 - Attachment is obsolete: true
Attachment #261835 - Flags: review?(ginn.chen)
Attachment #261831 - Flags: review?(ginn.chen)
Attached patch Perf tweakSplinter Review
Attachment #261835 - Attachment is obsolete: true
Attachment #261837 - Flags: review?(ginn.chen)
Attachment #261835 - Flags: review?(ginn.chen)
Attachment #261837 - Flags: review?(ginn.chen) → review+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: