Closed dhinesh03 closed 10 years ago
Here is the gist link https://gist.github.com/dhinesh03/5387358 . There I have a select view to which I m applying mobiscroll. The select view directly appended inside the div(id = "testView") is working properly but the same created as a childView of an Ember.ContainerView(appended inside div id="testContainer") is not working properly. In normal web browsers it will work fine but not in mobile browsers. Ember version Im using is 0.9.8.1 ,mobiscroll version is 2.5.0 and the ember touch tag ver is support 0.9.7.1
Mobiscroll has its own touch functionality so it doesn't work with ember touch .I used the following changes on _dispatchEvent function on ember.js file to solve this issue.
/* @private / _dispatchEvent: function(object, evt, eventName, view) { var result = true;
var handler = object[eventName];
var MOBISCROLL = false;
if(typeof evt.originalEvent !=="undefined" && Ember.typeOf(evt.originalEvent.srcElement) !== "undefined") {
if(evt.originalEvent.srcElement.className == "dwwo") {
MOBISCROLL = true;
}
}
if (Ember.typeOf(handler) === 'function' && !MOBISCROLL) {
result = handler.call(object, evt, view);
// Do not preventDefault in eventManagers.
evt.stopPropagation();
} ...
You would need to setup your ember views to work as Mobiscroll UI controls. Then, touch events can be delegated to ember-touch package through ember views.
I have never used Mobiscroll, but I would be willing to look at it, if you provide a gist and a detailed description of your use case.