jquery.mobile.vmouse.js:
- Modified triggerVirtualEvent() so that it returns the virtual event instead of the isDefaultPrevented() result of the virtual event.
- Updated all references to triggerVirtualEvent() that relied on the boolean return value to instead check the isDefaultPrevented() call on the event now returned.
- Updated mouseEventCallback() to propagate the iDefaultPrevented(), isPropagationStopped(), and stopImmediatePropagation() values from the virtual event on to the original mouse event.
jquery.mobile.event.js
- Modified the "taphold" trigger code to create a new $.Event() instead of passing the stale vmousedown event.
- Added clearTapTimer() which is called from a new vmouseup binding, to prevent the timer from firing between the tie the finger/mouse goes up and the click event is dispatched.
- Added some propagation tests for the "tap" event. Tests for "taphold" will have to wait until we fix the problem where multiple taphold timers are fired off when an element and one of its ancestors is bound to taphold.
- Check for existence of the bindings object before attempting to use it. Apparently jQuery core strips off any data bindings of an element before calling teardown on it to remove special event handlers.
- Modified vmouse code so that it uses $.data() instead of $().data() which is significantly faster.
- Modified the navigation and buttonMarkup code so they stop using live(). The vmouse code triggers several events during the touch events, which in turn causes the underlying event code to call $.closest() with the selector used during the live() call to figure out if the event should be handled. This turns out to be very expensive, so instead, we now just bind directly to the document, and walk the DOM manually to figure out if we should handle it. This is much faster since we are avoid triggering multiple nested function calls.
- Don't bind and unbind our touch listeners dynamically. This gets Android 2.1 into a strange state where it stops dispatching touch events. Instead, we now register our touchmove, touchend and scroll listeners at the same time we register our permanent touchstart listener, we then block and unblock processing in our touch listeners via a flag.
1333 - Delay when scrolling over list when data-theme="d"
1368 - Listview refresh performance on a4
1407 - Bad scroll performance since A4 on iPhone 3G
Removed the checking for window.pageX/pageY in the vmouse touch callbacks. Accessing pageX/pageY causes the browser to flush its rendering queue.
- Modified createVirtualEvent to use changedTouches if touches doesn't exist.
- Also filed issue 1373 about the fact that we really need to be tracking touch identifiers in the vmouse code.
- Modified the button markup behavior so that it uses the virtual mouse events and adds the ui-btn-active class on vmousedown, and then removes it on vmousemove or vmouseup.