#7369 introduced a validating layer over `WindowBase.PlatformImpl` that is only enabled in debug mode. This validating layer was causing unit tests to fail in debug mode but not on CI which runs tests in release mode.
Fix the problems:
- `PopupRoot` was not correctly disposing itself on `Dispose` - make it call `HandleClosed` in order to perform the same steps as when the popup is closed via other means
- Some unit tests try to access the `PlatformImpl` to get hold of a mock. Added `ValidatingWindowImpl.Unwrap` to allow this
- `ValidatingWindowBaseImpl.Activated` was setting the wrong property on the wrapped `PlatformImpl`.
DoubleTapped now can be triggered by touch
Fixed DoubleTapped triggering logic, previously it could be triggered only when you click twice, didn't work when you click 4 times,6, etc.
Fixed Tapped to be triggered only once when you double-click, now it triggers Tapped once and DoubleTapped once instead of triggering Tapped two times and DoubleTapped once.Matches UWP behaviour.
* [MenuItem] [Performance] Evaluate CanExecute on menu show and only if menu is visible
* [Revert] a change from another PR
* Update tests/Avalonia.Controls.UnitTests/MenuItemTests.cs
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* Update tests/Avalonia.Controls.UnitTests/MenuItemTests.cs
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
* fix typo
* [MenuItem] fix IsEffectivelyEnabled and cover with tests
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Max Katz <maxkatz6@outlook.com>
* Added failing tests for #838.
* Fix Text events when setting SelectedText.
Only raise a single property changed event on `Text` when setting `SelectedText`. It's a bit ugly but the whole of `TextBox` needs a refactor...
Fixes#838.
* Send one notification per sequential range in RemoveAll method of AvaloniaList (optimized)
* Simplified
* Make unit tests a bit more understandable.
Co-authored-by: Gitea <gitea@fake.local>
Co-authored-by: Dariusz Komosiński <darek.komosinski@gmail.com>
Co-authored-by: Steven Kirk <grokys@users.noreply.github.com>
Co-authored-by: Steven Kirk <grokys@gmail.com>
When a native popup window is positioned relative to a placement target on
the root window and the root window is moved or resized, the popup position
should update to reflect the new position of the placement target.
If a native popup window is positioned relative to another popup, as in the
case of sub-menus, and the parent popup is moved due to a change in the
position of its placement target, the child popup should also update
relative to the new position of the parent popup.