-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18921 from unoplatform/dev/xygu/20241125/wasm-poi…
…nterdown-over-selection-2 fix(wasm): unwanted preview shown when dragging over existing selection
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/SamplesApp/UITests.Shared/Windows_UI_Xaml/DragAndDrop/DragDrop_Wasm_Selection.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<UserControl x:Class="UITests.Windows_UI_Xaml.DragAndDrop.DragDrop_Wasm_Selection" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
|
||
<StackPanel Spacing="16"> | ||
<TextBlock Text="selectable text: // 1. select from HERE" IsTextSelectionEnabled="True" /> | ||
|
||
<!-- some controls that typically use drag gestures --> | ||
<Slider /> | ||
<ScrollBar Orientation="Horizontal" IndicatorMode="MouseIndicator" /> | ||
|
||
<TextBlock Text="selectable text: // 2. to THERE" IsTextSelectionEnabled="True" /> | ||
</StackPanel> | ||
</UserControl> |
23 changes: 23 additions & 0 deletions
23
src/SamplesApp/UITests.Shared/Windows_UI_Xaml/DragAndDrop/DragDrop_Wasm_Selection.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Microsoft.UI.Xaml.Controls; | ||
using Uno.UI.Samples.Controls; | ||
|
||
namespace UITests.Windows_UI_Xaml.DragAndDrop; | ||
|
||
#if __WASM__ | ||
[Sample( | ||
Description = PageDescription, | ||
IsManualTest = true, | ||
IgnoreInSnapshotTests = true)] | ||
#endif | ||
public sealed partial class DragDrop_Wasm_Selection : UserControl | ||
{ | ||
private const string PageDescription = | ||
"This is wasm-only manual test verifying against #18854. " + | ||
"While selection covers both TextBlocks, try to drag the thumb of the Slider and ScrollBar, " + | ||
"there should be no drag preview."; // see linked issue for a gif of what should not happen. | ||
|
||
public DragDrop_Wasm_Selection() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters