-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
adr
for tap event is not simulated in a overlay
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...1-fix-tap-event-is-not-simulated-in-a-overlay-on-flutter-3-7-for-web-desktop.md
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 @@ | ||
# 1. Fix tap event is not simulated in a overlay on Flutter 3.7 for Web/Desktop | ||
|
||
Date: 2023-04-24 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Tap events are not being simulated to overlay on the `Web/Desktop` but work fine on mobile devices. This worked fine until the previous release stable 3.3. | ||
|
||
## Root causes | ||
|
||
Because the thing that the overlay is attached to is a `TextField`, so in order to keep from unfocused the text field when tapping outside of it, you need to tell the overlay widget that it's part of the TextField for purposes of the `tap outside` behavior by adding the `TextFieldTapRegion` around it, so that when the tap arrives, it's considered `inside` of the text field. | ||
|
||
## Decision | ||
|
||
Try wrapping a `TextFieldTapRegion` around the `Material` in the overlay. | ||
|
||
## Consequences | ||
|
||
This worked fine |