Closed Bug 260921 Opened 20 years ago Closed 18 years ago

'object:text-changed:delete' details off by 1 for backspace operation

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: do, Assigned: aaronlev)

References

Details

(Keywords: access)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040726
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040726

When user deletes one char (by using backspace) an 'object:text-changed:delete'
event is fired. The two details of this event should provide informations about
the current offset (after the char was deleted) and the number of deleted chars
(1 in this case).
Currently, these details looks like:
  detail1=offset before the char was deleted (the current offset, _after_  
          deleting the char, is needed)
  detail2=0 (no of deleted char is needed - 1 in this case)

This bug partially causes http://bugzilla.gnome.org/show_bug.cgi?id=151579 

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Keywords: access
Summary: Incorrect informations (details) sent by 'object:text-changed:delete' at-spi event → Incorrect informations (details) sent by 'object:text-changed:delete' at-spi event
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Still there.  Aaron, can you turn off these auto-bug-closure things?
Assignee: aaronleventhal → nobody
Blocks: newatk
when deleting characters in textfield, 'object:children-change:add' events are fired, but no 'object:text-changed:delete' event fired.

I'm using trunk build.
'object:text-changed' events are only fired by nsHyperTextAccessible::DidInsertNode(), nsHyperTextAccessible::WillDeleteNode(), nsHyperTextAccessible::DidInsertText(), nsHyperTextAccessible::WillDeleteText(), and nsHyperTextAccessible::DidDeleteText().
But it seems that these functions are never called.
Also see bug 334353.
Assignee: nobody → Evan.Yan
(In reply to comment #4)
> 'object:text-changed' events are only fired by
> nsHyperTextAccessible::DidInsertNode(),
> nsHyperTextAccessible::WillDeleteNode(),
> nsHyperTextAccessible::DidInsertText(),
> nsHyperTextAccessible::WillDeleteText(), and
> nsHyperTextAccessible::DidDeleteText().
> But it seems that these functions are never called.

It's also fired by WillDeleteSelection and DidInsertNode.
Depends on: 344423
This is caused by bug 344423. Very difficult to fix.
Status: UNCONFIRMED → NEW
Ever confirmed: true
After nsHyperTextAccessible introduced, nsDocAccessible::SetEditor() is not called and the editActionListener isn't registered. So when deleting/inserting text, the notification methods are not called.
Status: NEW → ASSIGNED
for the part of no 'text-changed' event fired, 

1) it's not reproduceable for html and xul textfield in the latest build.
2) it is a bug that nsDocAccessible::CheckForEditor() doesn't call SetEditor() in
http://lxr.mozilla.org/seamonkey/source/accessible/src/base/nsDocAccessible.cpp#374
I'll fix this in the next related patch.
Summary: Incorrect informations (details) sent by 'object:text-changed:delete' at-spi event → 'object:text-changed:delete' details off by 1 for backspace operation
I have a fix for this which needs thorough testing in bug 344423. Infortunately it has to touch core editor code.
The fix in bug 344423 does work.
Assignee: Evan.Yan → aaronleventhal
Status: ASSIGNED → NEW
Fixed by checkin to bug 344423.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.