nativescript-ui-feedback icon indicating copy to clipboard operation
nativescript-ui-feedback copied to clipboard

RadListView itemTap only fires once on iOS

Open jelledijkstra97 opened this issue 4 years ago • 3 comments

Please, provide the details below:

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital letter.

Which platform(s) does your issue occur on?

iOS (not tested on Android)

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

  • Progress NativeScript UI plugin version: 9.0.4
  • CLI: 7.0.11
  • Cross-platform modules: ~7.0.0
  • Runtime(s): 7.0.6

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

  1. Start the application ..
  2. Tap an item --> This works as expected
  3. Tap the item again --> Event not fired

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

I've located the problem in line 833 of ui-listview.ios.js. There you find the following code fragment

if (currentIndexPath && touchEvent.tapCount === 1) { if (owner.hasListeners(commonModule.RadListView.itemTapEvent)) { var args = { ios: touches, eventName: commonModule.RadListView.itemTapEvent, object: owner, view: this.myContentView, index: owner._getIndexForIndexPath(currentIndexPath), groupIndex: currentIndexPath.section }; owner.notify(args); } }

As you can see the event is only fired when tapCount equals 1. What is the idea behind this line? If there is none, can it be removed?

jelledijkstra97 avatar Dec 08 '20 18:12 jelledijkstra97

Unfortunately this is still a problem...

jelledijkstra97 avatar Apr 10 '21 09:04 jelledijkstra97

wtf

baylesa-dev avatar Dec 01 '21 15:12 baylesa-dev

So I stumbled upon this problem; It got me stumped for a while. Last Thursday I provided a possible solution but it seems like this was not a viable solution after all.

The real source of the problem was that I was wrapping touch events on higher level elements in my template.

I am unsure of the reason why this is not supported in ios but removing my @touch event resolved it.

MarkOdey avatar Oct 03 '22 15:10 MarkOdey