Repository navigation
Commit 4fe2d65
committed
fix(windows): close modals on light dismiss
The modal Popup's Closed handler was attached with
AddHandler(Popup.ClosedEvent, ...), but Popup.Closed is a plain event,
not a routed one: Popup.ClosedEvent is undefined, the call threw and
the empty catch hid it. Clicking outside a cancelable modal closed the
Popup without running the modal's close logic, so the view kept its
modal state and the close callback never fired. The handler is now
assigned to popup.Closed and cleared with null on close.
Also corrects the TextField comment: AddHandler(KeyDownEvent, handler,
true) works with a runtime that boxes JS delegates for Object
parameters (NativeScript/windows#41); the KeyDown event stays as the
fallback for runtimes that can't.1 parent 298c76d commit 4fe2d65
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1994 | 1994 | | |
1995 | 1995 | | |
1996 | 1996 | | |
1997 | | - | |
1998 | | - | |
| 1997 | + | |
| 1998 | + | |
1999 | 1999 | | |
2000 | 2000 | | |
2001 | 2001 | | |
| |||
2040 | 2040 | | |
2041 | 2041 | | |
2042 | 2042 | | |
2043 | | - | |
2044 | | - | |
| 2043 | + | |
| 2044 | + | |
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
0 commit comments