diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 9610783..dd705a5 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2067,7 +2067,8 @@ class Script(default.Script):
                 candidate = candidate.parent
 
             if self.utilities.isSameObject(obj, candidate) \
-               and start <= offset < end:
+               and (start <= offset < end or candidate.getRole() == \
+               pyatspi.ROLE_ENTRY):
                 index = contents.index(content)
                 break
 
