When editor new value is being set to the initial/original value of the editor, it is not commited. The bug is caused by the code below because propertyRecord.value is always the same and therefore the condition passes. When switching to other values it works fine because propertyRecord.value and newValue are different.
To Reproduce
Select the selection tool from the toolbar.
In tool settings, switch to another selection mode - crossing line or box.
Switch back to single selection mode.
Try to select elements in the view.
Notice that instead of using single selection mode, it's still selecting using previously chosen mode (crossing line or box). One of the ways to get back to single selection mode, is to clear selection, as that seem to reset the tool.
Expected Behavior
Should commit the new value even if it the same as the initial/original value.
Screenshots
Desktop (please complete the applicable information)
AppUI version 4.16.0 and up.
Additional context
Not really sure if propertyRecord.value is supposed to always stay the same or if it should change but the main issue is that when newValue is the same as the original propertyRecord.value it does not commit . Bug was introduced in #928.
Describe the bug
When editor new value is being set to the initial/original value of the editor, it is not commited. The bug is caused by the code below because
propertyRecord.value
is always the same and therefore the condition passes. When switching to other values it works fine becausepropertyRecord.value
andnewValue
are different.To Reproduce
Expected Behavior
Should commit the new value even if it the same as the initial/original value.
Screenshots
Desktop (please complete the applicable information)
Additional context
Not really sure if
propertyRecord.value
is supposed to always stay the same or if it should change but the main issue is that whennewValue
is the same as the originalpropertyRecord.value
it does not commit . Bug was introduced in #928.Bug originally discovered in https://github.com/iTwin/itwinjs-backlog/issues/1219.