[orca] Only update context at end of contenteditable element during char nav



commit 1c9e362a90cb99e07433583899ae2309c34f1499
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Apr 25 15:05:24 2020 -0400

    Only update context at end of contenteditable element during char nav
    
    We were updating the caret content when the caret moved to the end of
    a contenteditable element unless the movement resulted from line nav
    or line boundary nav. The idea was that if char nav or word nav were
    used, the behavior would be wanted. But some editors give us caret-moved
    events for the end of an object as a consequence of inserting or deleting
    text. In those instances, updating our context can cause the default
    script to not present the caret moved event.
    
    More research should be done to determine if this update should be done
    for word navigation.

 src/orca/scripts/web/script_utilities.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 891856800..ddb222790 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4627,9 +4627,7 @@ class Utilities(script_utilities.Utilities):
                 return obj, 0
 
         if text and offset >= text.characterCount:
-            if self.isContentEditableWithEmbeddedObjects(obj) \
-               and not self.lastInputEventWasLineNav() \
-               and not self.lastInputEventWasLineBoundaryNav():
+            if self.isContentEditableWithEmbeddedObjects(obj) and self.lastInputEventWasCharNav():
                 nextObj, nextOffset = self.nextContext(obj, text.characterCount)
                 if not nextObj:
                     msg = "WEB: No next object found at end of contenteditable %s" % obj


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]