Fix some issues with clickables on some websites.
This commit is contained in:
1 parent
d0c977281d
commit
20578ada40
7 files changed
+304
-2
No files matched your search
@@ -269,6 +269,10 @@ func (adapter *Adapter) activateNativeDocumentObject(ctx context.Context, positi
|
||||
}
|
||||
if activated != 0 {
|
||||
adapter.treeInvalidations.Add(uint64(tree.markAncestorChildrenChanged(position.ID())))
|
||||
// Caret navigation tolerates stale child order on ticking pages.
|
||||
// A completed action must instead refresh before leaving its
|
||||
// target, or it can skip a newly revealed popup entirely.
|
||||
adapter.treeInvalidations.Add(uint64(tree.InvalidateSnapshot(position.ID())))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -551,15 +555,21 @@ func (adapter *Adapter) setNativeDocumentPosition(ctx context.Context, position
|
||||
for _, id := range echoIDs {
|
||||
adapter.navigationEcho[id] = 15
|
||||
}
|
||||
text := C.atspi_accessible_get_text_iface(source)
|
||||
component := C.atspi_accessible_get_component_iface(source)
|
||||
if component != nil {
|
||||
if documentTargetGrabsFocus(tree, position, snapshot) {
|
||||
C.atspi_component_grab_focus(component, nil)
|
||||
}
|
||||
C.atspi_component_scroll_to(component, C.ATSPI_SCROLL_ANYWHERE, nil)
|
||||
// Setting a text caret reveals its range. An additional whole-object
|
||||
// scroll can move the outer document while reading a popup's inner
|
||||
// scroller, causing the page to dismiss the popup. Python likewise
|
||||
// relies on caret placement for text; non-text stops still need scroll.
|
||||
if text == nil {
|
||||
C.atspi_component_scroll_to(component, C.ATSPI_SCROLL_ANYWHERE, nil)
|
||||
}
|
||||
C.g_object_unref(C.gpointer(component))
|
||||
}
|
||||
text := C.atspi_accessible_get_text_iface(source)
|
||||
if text == nil {
|
||||
clear(adapter.navigationEcho)
|
||||
// Images and other whole-object stops have a valid virtual position
|
||||
|
||||
Reference in new issue
Block a user