Using the specialized selection APIs for text controls will initialize the editor beforehand. Currently, nsIAccessibleText seems to be using the document selection APIs, which is both wrong, and will not initialize the editor. We need to switch to using those APIs (selectionStart and selectionEnd properties) in our nsIAccessibleText implementation.
Ehsan, what is specialized selection API?
The following API: nsITextContolFrame::SetSelectionStart nsITextContolFrame::SetSelectionEnd nsITextContolFrame::SetSelectionRange nsITextContolFrame::GetSelectionRange And also nsITextContolFrame::GetOwnedSelectionController if you need access to the selection controller used by the text control frame.
8 years ago
Assignee: bolterbugz → nobody
Fixing this bug may be a simple task by the patch in bug 560665. I suspect that if you also register nsEditorInitializerOnSelection on the SELECTION_ACCESSIBILITY selection type as well, you'd get a fix for free. Of course someone on the a11y team needs to confirm this. I'm setting a dependency for now.
Depends on: 560665
(In reply to comment #3) > Fixing this bug may be a simple task by the patch in bug 560665. I suspect > that if you also register nsEditorInitializerOnSelection on the > SELECTION_ACCESSIBILITY selection type as well, you'd get a fix for free. Of > course someone on the a11y team needs to confirm this. > > I'm setting a dependency for now. What I said here might not be a good answer, because that code listens to selections on the pres shell, and we really don't want to do that here, because the text box has its own selection controller. But I think a similar approach in nsTextInputListener might work here.
Although, comment 4 is only true for editor initialization. The selection manipulations performed by nsIAccessibleText would still be on the wrong selection object.
You need to log in before you can comment on or make changes to this bug.