Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

WebView inside view: touch event does not work

$
0
0

I am using the ds.slideMenu widget, that has the following view:

<Alloy>
    <View id="containerview">
        <View id="leftMenu">
            <TableView id="leftTableView" />
        </View>
        <View id="movableview">
            <View id="shadowview">
                <View id="navview">
                    <Button id="leftButton" />
                </View>
                <View id="contentview" />
            </View>
        </View>
    </View>
</Alloy>
and the view to display the webview is the following one:
<Alloy>
    <View class="container">
      <WebView id="webview" url="myremoteurlhere" onLoad="construct"/>
    </View>
</Alloy>
To introduce what the code of ds.slideMenu does, here's what happens when you change your view:
function rowSelect(e) {
  if (Alloy.Globals.currentView.id != e.row.customView) {
    $.ds.contentview.remove(Alloy.Globals.currentView);
    currentView = Alloy.createController(e.row.customView).getView();
    currentView.touchEnabled = true;
    Alloy.Globals.currentView = currentView;
    $.ds.contentview.add(currentView);
  }
}
movableview had an addEventListener for 'touchstart', 'touchend', 'touchmove' and for sure is getting the event instead of my webview. Now, the webview is loaded without problems, but on the iOS simulator the touch event does not work. Clicking on the loaded page, nothing happens.

Any hints, please? Thanks in advance.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>