Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13580] iOS: ScrollViews inside TableViewRow supressing all click events

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2013-04-17T19:14:34.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/sn/a
ComponentsiOS
Labelsregression
ReporterMitchell Amihod
AssigneeIngo Muschenetz
Created2013-04-13T22:05:11.000+0000
Updated2017-03-22T23:02:24.000+0000

Description

Placing a ScrollView inside a TableViewRow causes all click events to be suppressed. Expected: Clicking on the ScrollView inside the TableViewRow would trigger all the attached click listeners. Result: Nothing happens - the click event doesn't fire on the ScrollView, TableViewRow or TableView. Clicking outside the ScrollView on the TableViewRow does fire click event on TVR and TV. Notes: * When testing on 2.1.4.GA - Clicking on the ScrollView at least triggers the click event on the TableView and TableViewRow * When the ScrollView is .add to window, click handler on SV behaves as normal. Please see attached app.js

Attachments

FileDateSize
app.js2013-04-13T22:05:12.000+0000776

Comments

  1. Daniel Sefton 2013-04-15

    Actually the behavior of 2.1.4 seems wrong to me... I don't see why you wouldn't want the touch events to take priority on the scroll view in order for it to capture the input for scrolling? Anyway, since I've confirmed it as a regression, I'll move to TiMob to get confirmation from our engineering team.
  2. Mitchell Amihod 2013-04-16

    Hi Daniel, Actually, not sure what you mean by priority? Also not clear what seems wrong to you? My issue is no click event is firing on that scrollview, or the parent views. If I could attach a click listener to the SV, that would be fine too, since i could work around that. In 2.1.4, you can still scroll the view like normal, but click event bubbles up to the table/table row. my use case: There is a table row which shows a list of tags. If there is more than the row contains, you can scroll horizontally to see them all. On Click, we open a window to allow user to edit tags.
  3. Daniel Sefton 2013-04-16

    Sorry Mitchell, like I say I don't believe the bubbling as occurs in 2.1.4 is the correct behavior, however the SV event should be firing when you click on it, that's right. So that's the issue here.
  4. Mitchell Amihod 2013-04-16

    no worries. Just trying to understand. In light of the new bubbles property for events, i think keeping the bubbling behaviour would be useful (allows for delegate pattern) just set bubbles to false to stop it from bubbling up if that is someones prefered behaviour. Right now, putting click handler on the SV would be a workaround for me. basically will attach same handler x2 (once to table, once to sv) and detect if its the SV click and crawl up the parent chain to find the row. thanks.
  5. Daniel Sefton 2013-04-16

    Yeah, I did try to use the new bubbleParent property, but that didn't work. You're right that it might be ideal to have the behavior affected by that property. It's still early days though, there are issues like TIMOB-13544 that we need to figure out first.
  6. Ingo Muschenetz 2013-04-17

    This is a change as a result of the linked bug. Reverting that ticket would cause a much larger set of regressions. It is suggested that using a single-tap listener on ScrollView will get you the desired behavior. Please let us know if that doesn't work as expected.
  7. Mitchell Amihod 2013-04-17

    ok.
  8. Lee Morris 2017-03-22

    Closing ticket as "Won't Fix".

JSON Source