-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed [Windows] TapGestureRecognizer not working on Entry (#25311)
* [Windows] TapGestureRecognizer not working on Entry * RemoveHandler added for tapped and double tapped event * Test case committed * snapshot for ios platform has committed * Review correction committed * Codes modified and committed * Properly handled tapped and double tapped event handlers. * code changes committed * Snapshots committed * Comment added for why Fails on mac attribute is added. * Removed failsOnMac attribute --------- Co-authored-by: Karthik Raja <[email protected]> Co-authored-by: KarthikRajaKalaimani <[email protected]>
- Loading branch information
1 parent
8b96f6d
commit d54be6f
Showing
6 changed files
with
72 additions
and
6 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
Binary file added
BIN
+83.7 KB
...Cases.Android.Tests/snapshots/android/TapGestureRecognizerNotWorkingOnEntry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.CustomAttributes; | ||
using Microsoft.Maui.Graphics; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[Issue(IssueTracker.Github, 12213, "[Windows] TapGestureRecognizer not working on Entry", PlatformAffected.UWP)] | ||
public class Issue12213 : TestContentPage | ||
{ | ||
|
||
public Issue12213() | ||
{ | ||
} | ||
|
||
protected override void Init() | ||
{ | ||
var stackLayout = new StackLayout(); | ||
|
||
var entry = new Entry(); | ||
entry.Placeholder = "Enter Your Name"; | ||
entry.AutomationId = "Entry"; | ||
var tapGestureRecognizer = new TapGestureRecognizer(); | ||
tapGestureRecognizer.Tapped += TapGestureRecognizer_Tapped; | ||
tapGestureRecognizer.NumberOfTapsRequired = 1; | ||
entry.GestureRecognizers.Add(tapGestureRecognizer); | ||
stackLayout.Children.Add(entry); | ||
Content = stackLayout; | ||
} | ||
|
||
private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e) | ||
{ | ||
DisplayAlert("Entry", "Tapped", "OK"); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12213.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,27 @@ | ||
#if !MACCATALYST | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue12213 : _IssuesUITest | ||
{ | ||
public Issue12213(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "[Windows] TapGestureRecognizer not working on Entry"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Entry)] | ||
[Category(UITestCategories.Gestures)] | ||
public void TapGestureRecognizerNotWorkingOnEntry() | ||
{ | ||
App.WaitForElement("Entry"); | ||
App.Tap("Entry"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} | ||
#endif |
Binary file added
BIN
+12.5 KB
...stCases.WinUI.Tests/snapshots/windows/TapGestureRecognizerNotWorkingOnEntry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+83.1 KB
...sts/TestCases.iOS.Tests/snapshots/ios/TapGestureRecognizerNotWorkingOnEntry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.