View Issue Details

IDProjectCategoryView StatusLast Update
0002817NoesisGUIC++ SDKpublic2023-11-06 17:06
Reporternvonhertzen Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status feedbackResolutionopen 
Product Version3.2 
Summary0002817: Focus not getting removed on disabled elements after update from 3.2.1->3.2.2
Description

There seems to be a change in behavior where prior to < 3.2.2 the focus of elements would be removed after IsEnabled was set to false. With 3.2.2 this does not appear to occur anymore, breaking many of our element styles as they are based on those property values.

Attached are two screenshots from the Gui Inspector on the same element, one from 3.2.1 and one from 3.2.2.

Steps To Reproduce

Focus an element
Set the element IsEnabled state to false
Observe the focus still remaining on the element

Attached Files
3_2_2.png (29,516 bytes)   
3_2_2.png (29,516 bytes)   
3_2_1.png (30,797 bytes)   
3_2_1.png (30,797 bytes)   
PlatformAny

Activities

sfernandez

sfernandez

2023-11-03 12:42

manager   ~0008925

Hello,

This is related to the implementation of the FocusManager (0001982) and the logical focus.

The property IsFocused indicates if the element has the logical focus in its focus scope (there can be several focus scopes, so more than one element with logical focus can exist at the same time).
The property IsKeyboardFocused indicates if the element has the keyboard focus (only one element in the whole UI can have the keyboard focus).

When a focused element is disabled, it loses the keyboard focus, but the logical focus remains and the focus scope still keeps a reference to that element. This is how WPF behaves and how we implemented it in Noesis.

Does this make sense to you?

nvonhertzen

nvonhertzen

2023-11-06 06:14

reporter   ~0008927

Thanks, that makes sense. Is there any way for us to easily track (breaking) changes like this in the future? Reading through the Changelog for 3.2.2 it wasn't obvious the introduction of the FocusManager would have changed existing behavior (instead of just introducing new functionality).

sfernandez

sfernandez

2023-11-06 17:06

manager   ~0008929

The changelog should be the place where these breaking changes should be explained. This was a mistake from our side and we are going to fix the changelog and improve the related documentation.

We were solving an incorrect behavior regarding the logical focus (IsFocused property and GotFocus/LostFocus events) with the implementation of FocusManager.

Issue History

Date Modified Username Field Change
2023-11-03 08:47 nvonhertzen New Issue
2023-11-03 08:47 nvonhertzen File Added: 3_2_2.png
2023-11-03 08:47 nvonhertzen File Added: 3_2_1.png
2023-11-03 08:57 nvonhertzen Summary Focus not getting removed on disabled elements after updater from 3.2.1->3.2.2 => Focus not getting removed on disabled elements after update from 3.2.1->3.2.2
2023-11-03 12:42 sfernandez Assigned To => sfernandez
2023-11-03 12:42 sfernandez Status new => feedback
2023-11-03 12:42 sfernandez Note Added: 0008925
2023-11-06 06:14 nvonhertzen Note Added: 0008927
2023-11-06 06:14 nvonhertzen Status feedback => assigned
2023-11-06 17:06 sfernandez Status assigned => feedback
2023-11-06 17:06 sfernandez Note Added: 0008929