nativescript-windowed-modal icon indicating copy to clipboard operation
nativescript-windowed-modal copied to clipboard

iOS: ModalStack swallowing ListView tap events

Open jnorkus opened this issue 6 years ago • 7 comments

Which platform(s) does your issue occur on?

  • iOS only

Please, provide the following version numbers that your issue occurs with:

  • CLI: 5.0.1
  • Cross-platform modules: 5.0.5
  • Runtime(s): 5.0.0
  • Plugin(s): I don't think that's relevant

Please, tell us how to recreate the issue in as much detail as possible.

Place a ListView inside a ModalStack and handle its itemTap event. outsideTap gets called, correctly identifies that it was inside the rect, returns. But event doesn't reach the handler.

jnorkus avatar Dec 17 '18 14:12 jnorkus

Reference project:

https://play.nativescript.org/?template=play-ng&id=Lrwg8A

comment ModalStack out and listview will work. Tapping the label which has its own tap works

edusperoni avatar Dec 17 '18 14:12 edusperoni

This is a bug with nativescript. binding a tap on a parent element prevents tapping on the listview:

https://play.nativescript.org/?template=play-ng&id=Lrwg8A&v=4

We'll open an issue shortly

edusperoni avatar Dec 17 '18 14:12 edusperoni

Issue: NativeScript/NativeScript#6718

mukaschultze avatar Dec 17 '18 15:12 mukaschultze

Actual issue for reference: https://github.com/NativeScript/NativeScript/issues/6376

edusperoni avatar Dec 18 '18 11:12 edusperoni

For fullscreen Modals, I used a <StackLayout> instead of the defined <ModalLayout>, and my @itemTap worked like normal, just in case anyone is needing a quick fix. I guess it's the same as commenting it out, but if you are using the parent <ModalLayout> for styling, like .modal-container, this might be a solution for you.

darrenkhouston avatar Jan 28 '19 17:01 darrenkhouston

The ModalStack is used for layout and closing the modal when touching outside of the child frame, this feature won't work without it, and can cause some inconsistency between Android and iOS.

mukaschultze avatar Jan 28 '19 17:01 mukaschultze

@mukaschultze, same for me. Do you know how we can do any workaround?

romandrahan avatar Aug 07 '19 14:08 romandrahan