[Nvda-dev] commit r1909 - in trunk: . source/virtualBuffers

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] commit r1909 - in trunk: . source/virtualBuffers

NVDA Subversion
Author: jteh
Date: Tue Apr 15 10:54:54 2008
New Revision: 1909

Log:
When comparing end points to determine whether to speak and update the caret in response to an event, allow an equal comparison for startToEnd and endToStart comparisons. This is necessary because the end offset is actually one past the last offset of the text. This fixes the issue where shift+tabbing to a control on the same line as the current control with no space between does not speak or move the caret; e.g. shift+tabbing to the Google Search button from the I'm Feeling Lucky button on Google.

Modified:
   trunk/   (props changed)
   trunk/source/virtualBuffers/gecko_ia2.py

Modified: trunk/source/virtualBuffers/gecko_ia2.py
==============================================================================
--- trunk/source/virtualBuffers/gecko_ia2.py (original)
+++ trunk/source/virtualBuffers/gecko_ia2.py Tue Apr 15 10:54:54 2008
@@ -133,7 +133,7 @@
  startToEnd=newInfo.compareEndPoints(oldInfo,"startToEnd")
  endToStart=newInfo.compareEndPoints(oldInfo,"endToStart")
  endToEnd=newInfo.compareEndPoints(oldInfo,"endToEnd")
- if (startToStart<0 and endToEnd>0) or (startToStart>0 and endToEnd<0) or endToStart<0 or startToEnd>0:  
+ if (startToStart<0 and endToEnd>0) or (startToStart>0 and endToEnd<0) or endToStart<=0 or startToEnd>=0:  
  if not self.passThrough:
  speech.cancelSpeech()
  speech.speakFormattedTextWithXML(newInfo.XMLContext,newInfo.XMLText,self,newInfo.getXMLFieldSpeech,reason=speech.REASON_FOCUS)
@@ -217,7 +217,7 @@
  startToEnd=newInfo.compareEndPoints(oldInfo,"startToEnd")
  endToStart=newInfo.compareEndPoints(oldInfo,"endToStart")
  endToEnd=newInfo.compareEndPoints(oldInfo,"endToEnd")
- if (startToStart<0 and endToEnd>0) or (startToStart>0 and endToEnd<0) or endToStart<0 or startToEnd>0:  
+ if (startToStart<0 and endToEnd>0) or (startToStart>0 and endToEnd<0) or endToStart<=0 or startToEnd>=0:  
  speech.speakFormattedTextWithXML(newInfo.XMLContext,newInfo.XMLText,self,newInfo.getXMLFieldSpeech,reason=speech.REASON_FOCUS)
  newInfo.collapse()
  newInfo.updateCaret()