diff --git a/addon/globalPlugins/ime_expressive.py b/addon/globalPlugins/ime_expressive.py index cbc59ae..4e14d7d 100644 --- a/addon/globalPlugins/ime_expressive.py +++ b/addon/globalPlugins/ime_expressive.py @@ -238,7 +238,7 @@ def handleInputCompositionStart(self,compositionString,selectionStart,selectionE self.ismsf=True self.isms=True self.handleInputCandidateListUpdate(obj.lastChild.name,0,'ms') - api.setNavigatorObject(obj) + self.setNavigatorObject(obj) except AttributeError as ae: log.warning(f"AttributeError in handleInputCompositionStart: {ae}") @@ -292,7 +292,7 @@ def speakPunc(self,isl=False): def clear_ime(self): global lastCandidate - api.setNavigatorObject(api.getFocusObject()) + self.setNavigatorObject(api.getFocusObject()) lastCandidate='' self.selectedCandidate='' self.selectedIndex=0 @@ -332,7 +332,7 @@ def event_UIA_window_windowOpen(self, obj, nextHandler): self.ismsf=True self.isms=True self.handleInputCandidateListUpdate(obj.lastChild.name,0,'ms') - api.setNavigatorObject(obj) + self.setNavigatorObject(obj) except AttributeError as ae: log.warning(f"AttributeError in event_UIA_window_windowOpen: {ae}") except Exception as e: @@ -346,7 +346,7 @@ def event_UIA_elementSelected(self, obj, nextHandler): self.ismsf=True self.isms=True self.handleInputCandidateListUpdate(obj.lastChild.name,int(obj.firstChild.name)-1,'ms') - api.setNavigatorObject(obj) + self.setNavigatorObject(obj) except AttributeError as ae: log.warning(f"AttributeError in event_UIA_elementSelected: {ae}") except Exception as e: @@ -425,4 +425,8 @@ def script_selectRight(self,gesture): queueHandler.queueFunction(queueHandler.eventQueue,speech.cancelSpeech) wx.CallAfter(brailleInput.BrailleInputHandler.sendChars,self,ch) break - self.clearGestureBindings () \ No newline at end of file + self.clearGestureBindings () + + def setNavigatorObject(self, obj): + if config.conf["reviewCursor"]["followFocus"]: + api.setNavigatorObject(obj) diff --git a/buildVars.py b/buildVars.py index dbb43b3..8a9993a 100644 --- a/buildVars.py +++ b/buildVars.py @@ -26,7 +26,7 @@ def _(arg): "addon_description": _("""This add-on provides Chinese input method support for the NVDA screen reader. It enhances the Chinese input experience in terms of input habits and efficiency for NVDA users."""), # version - "addon_version": "2024.9.28", + "addon_version": "2024.10.04", # Author(s) "addon_author": "Chenfu <394434124@qq.com> Cary-rowen ", # URL for the add-on documentation support