Hi,
I ran into this issue while writing an app module for Windows 10's MSN Weather app (Microsoft.msn.weather.exe):
If you define a handler for value change (from UIA's value event) as part of an app module or an overlay class (such as search box in Weather app), the first char entered isn't handled correctly (it might be my end).
STR:
- Run an app such as Weather app.
- Define an overlay class for search box and define a handler for value change event.
- With search box empty, enter some characters.
Expected: NVDA should run our custom handling routine for value change, such as locating controller for ID.
Actual: first char isn't handled correctly.
Test code path: in valueChange handler, I asked NVDA to print how many UI elements are affected by search term entry (this is what controller for ID is for). Execution ran thus:
- Search field is empty.
- First char comes in.
- Expected: Controller for count is printed.
- Actual: This path isn't executed.
- Second char comes in.
- Expected: Controller for routine is called a second time.
- Actual: Controller for count is called as though a single char was entered.
- This continues whenever new chars are entered.
So it seems valueChange is looking at the second to last char, not the end. This is an edit field with no auto-detection. The complete dev info is:
name: u'Search'
role: ROLE_EDITABLETEXT
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: 1
Python object: <NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA object at 0x04CF9170>
Python class mro: (<class 'NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA'>, <class 'appModules.microsoft_msn_weather.SearchBox'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.UIA.UIA'>, <class 'NVDAObjects.window.Window'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: u''
location: (794, 36, 250, 40)
value: u''
appModule: <'microsoft_msn_weather' (appName u'microsoft_msn_weather', process ID 2472) at address 4c7c2b0>
appModule.productName: u'Weather'
appModule.productVersion: u'4.11.156.0'
TextInfo: <class 'NVDAObjects.UIA.UIATextInfo'>
windowHandle: 1640546
windowClassName: u'Windows.UI.Core.CoreWindow'
windowControlID: 0
windowStyle: 1409286144
windowThreadID: 5876
windowText: u'Weather'
displayText: u''
UIAElement: <POINTER(IUIAutomationElement) ptr=0x625f3a0 at 4f673a0>
UIA automationID: TextBox
UIA frameworkID: XAML
UIA runtimeID: (42, 1640546, 2, 32)
UIA providerDescription: [pid:2472,hwnd:0x0 Main(parent link):Unidentified Provider (unmanaged:Windows.UI.Xaml.dll)]
UIA className: TextBox
SearchBox is there because it's an overlay class.
Thanks.
Hi,
I ran into this issue while writing an app module for Windows 10's MSN Weather app (Microsoft.msn.weather.exe):
If you define a handler for value change (from UIA's value event) as part of an app module or an overlay class (such as search box in Weather app), the first char entered isn't handled correctly (it might be my end).
STR:
Expected: NVDA should run our custom handling routine for value change, such as locating controller for ID.
Actual: first char isn't handled correctly.
Test code path: in valueChange handler, I asked NVDA to print how many UI elements are affected by search term entry (this is what controller for ID is for). Execution ran thus:
So it seems valueChange is looking at the second to last char, not the end. This is an edit field with no auto-detection. The complete dev info is:
name: u'Search'
role: ROLE_EDITABLETEXT
states: STATE_FOCUSABLE, STATE_FOCUSED
isFocusable: True
hasFocus: 1
Python object: <NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA object at 0x04CF9170>
Python class mro: (<class 'NVDAObjects.Dynamic_SearchBoxEditableTextWithoutAutoSelectDetectionUIA'>, <class 'appModules.microsoft_msn_weather.SearchBox'>, <class 'NVDAObjects.behaviors.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.UIA.UIA'>, <class 'NVDAObjects.window.Window'>, <class 'editableText.EditableTextWithoutAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.NVDAObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: u''
location: (794, 36, 250, 40)
value: u''
appModule: <'microsoft_msn_weather' (appName u'microsoft_msn_weather', process ID 2472) at address 4c7c2b0>
appModule.productName: u'Weather'
appModule.productVersion: u'4.11.156.0'
TextInfo: <class 'NVDAObjects.UIA.UIATextInfo'>
windowHandle: 1640546
windowClassName: u'Windows.UI.Core.CoreWindow'
windowControlID: 0
windowStyle: 1409286144
windowThreadID: 5876
windowText: u'Weather'
displayText: u''
UIAElement: <POINTER(IUIAutomationElement) ptr=0x625f3a0 at 4f673a0>
UIA automationID: TextBox
UIA frameworkID: XAML
UIA runtimeID: (42, 1640546, 2, 32)
UIA providerDescription: [pid:2472,hwnd:0x0 Main(parent link):Unidentified Provider (unmanaged:Windows.UI.Xaml.dll)]
UIA className: TextBox
SearchBox is there because it's an overlay class.
Thanks.