Commit graph

20 commits

Author SHA1 Message Date
Kin Blas
d4c7b5da66 Fix from @brukhabtu for issue 1492 - Errors when trying to delete DOM elements.
- 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.
2011-04-20 18:06:21 -07:00
Kin Blas
c31ee33a0f Fix for 1407 - Bad scroll performance since A4 on iPhone 3G
- 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.
2011-04-18 16:13:50 -07:00
Kin Blas
609d1de5f4 Fix for issue 1446 - Can't drag slider in 1.0a4.1 (Android 2.1)
- 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.
2011-04-13 15:52:51 -07:00
Kin Blas
0ef954575a Fix for issues:
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.
2011-04-08 11:01:41 -07:00
Kin Blas
600a43f746 Fix for ssue 1369 - vmouseup event has no [client/page/screen][X/Y] properties on iOS devices
- 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.
2011-04-05 10:21:54 -07:00
scottjehl
cdccf8f2af updated the fastclick comment 2011-03-30 21:32:38 -04:00
Kin Blas
62f8ce254e Bullet proof handleTouchStart() against fake touchstart events that don't have any touches[] properties defined. 2011-03-29 09:46:10 -07:00
Kin Blas
d32a8a6bb4 Fixed some jslint warnings. It caught a missing comma that would've broken the file during a minify. < whew! > 2011-03-25 21:26:10 -07:00
Kin Blas
d62864b7de Add dummy mouse/click handlers on bind elements so that they remain clickable on Opera Mini. 2011-03-25 20:35:24 -07:00
Kin Blas
aa58b2a7e6 Added back blocking based on ancestry. Looks like we need to block on both proximity and ancestry to work around touch and mouse target differences. 2011-03-25 18:00:58 -07:00
Kin Blas
d06ff28bf6 Re-introduced the concept of blocking the mouse handlers from firing trigger. It was needed to fix select menus. Everytime you would click a select button, the click event was being intercepted by whatever select item appeared at the point of tap which set the value of the select. 2011-03-24 14:57:51 -07:00
Kin Blas
8c5faaf01d A better fix for the case where we have mismatched touch and mouse targets. 2011-03-21 17:09:18 -07:00
Kin Blas
fe8e13c9a9 Added code to deal with touch and mouse event target mismatches. This happens most often when the user touches a link, but his/her finger overlaps the link and areas outside of the link. In this specific case, the browser will generate touch events with a target that is the parent or ancestor of the link, but it will then generate mouse events with a target that is the link itself. We now catch this case and re-enable the mouse bindings so we can dispatch our virtual events appropriately. 2011-03-16 09:30:40 -07:00
Kin Blas
562d89b762 Changes to reduce the number of times we traverse the parent hierarchy looking for virtual bindings when each event handler is called. 2011-03-14 14:25:25 -07:00
Kin Blas
9a431c89a5 Added $.support.eventCapture to detect support for listening for the event capture phase. We need this to disable vmouse touch support for WP7. We may be able to work around the lack of capture support in the near future, but until then, we fallback to just supporting mouse events. 2011-03-14 12:39:03 -07:00
Kin Blas
2de7cc5bbc Added vmousecancel to the vevents list so that users can bind to the event. 2011-03-11 10:30:16 -08:00
Kin Blas
3f627acba8 - Added support for a vmouseevent that is triggered when a touch results in the window scrolling.
- 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.
2011-02-25 22:20:04 -08:00
Kin Blas
3cb884b6d7 Added scrollThreshold and checks for page[XY]Offset changes within handleTouchMove to catch the case where the window scrolls, but the scroll events are not dispatched till after touchend. Note that page[XY]Offset is not updated before touchend on every platform, but it does seem to update on iOS which is where we need it. 2011-02-23 23:53:17 -08:00
Kin Blas
48389d1ee1 Fixed bad variable name in teardown method of jquery.mobile.vmouse.js. It was causing an error that made one() bindings fail to fire off their handlers.
Modified select and slider code to use virtual events.

Modified tap and taphold code to make use of the virtual events.
2011-02-18 17:39:04 -08:00
Kin Blas
815c8c3631 Moved experiments/fast-click/jquery.mobile.mouse.js to js/jquery.mobile.vmouse.js. 2011-02-18 12:37:02 -08:00
Renamed from experiments/fast-click/jquery.mobile.mouse.js (Browse further)