- 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.
- When we switched to virtual mouse events, I just did a straight translation of the code that existed which basically did the collapse/expand on mouseup. In order to factor in scrolling, I needed to move that code into a vclick handler and stopPropagation() and preventDefault() to make sure the button doesn't activate.
- 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.
Needed to modify _itemApply() to look for the first image that is the first child of its parent. I may need to tweak this at a later point because the selector is still too general.
- 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.
- Some optimizations to speed things up:
- Modified _itemApply() to make use of item.children() and filters. Also got rid of some unused code.
- Convert .each() in refresh() to a loop.
- Cache some $list.jqmData() values so we don't do it for each list item.
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.
- set active state on all button vclick events
- cancelled vclick on slider switch handles so it's not too sticky.
- removed addClass in navigation.js as the first change handles it there.
- 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.
- Third party click handlers never called.
- Touch and click target mismatches due markup changes before the click events are generated. (What looks like a double click event)