Commit graph

3216 commits

Author SHA1 Message Date
scottjehl
7be8311d4e added location.search to the original page data-url 2011-09-08 11:58:55 -04:00
scottjehl
d0fe757a28 Merge remote branch 'origin/master' 2011-09-07 10:10:32 -04:00
dtao
fa4d9c16d7 fixed typo: 'throttledResize' => 'throttledresize' 2011-09-07 10:09:00 -04:00
Kin Blas
abb812cc01 Fixes for issue 1464 - No way to stop a link from being followed with some custom event (tap, taphold)
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.
2011-09-07 10:09:00 -04:00
John Bender
ad7e5bc8d1 added comment for the touches event proto addition 2011-09-07 10:09:00 -04:00
John Bender
3dfcf5fd77 fixed event tests to trigger on a dom element 2011-09-07 10:09:00 -04:00
Kin Blas
5333ab7bf7 I noticed that the code in the mouseup for the toggle switch was using a CSS3 transition, but calling the animationComplete() function which waits for an animationend event which will never come. This means we bind a new animationComplete() handler every time the toggle switch is clicked.
I removed the binding for the handler completely since it doesn't hurt to just leave the transition in place. I also removed the code that was setting the position of the slider since it really should only be set within the mouseup if the user did not change the switch setting (toggle).
2011-09-07 10:09:00 -04:00
Kin Blas
2f160e1402 Fix for issue 2346 - Flip toggle switches don't animate when tapped.
- Changed the target selector for ui-slider-handle-snapping from:

    div.ui-slider-handle-snapping

  to:

    a.ui-slider-handle-snapping

  to match the actual markup being generated.
2011-09-07 10:09:00 -04:00
Kin Blas
81c3957129 Fix for issue 1925 - Single tap triggers two actions, especially in android B1
- Trigger the list item and keyboard return/space key up to the "click" event instead of "vclick". This delays the dismissal of the custom select menu until the click event, thereby avoiding the case where the menu disappears before the browser dispatches it's synthesized mouse events (in the touch case) with a target of whatever element was underneath the menu.
2011-09-07 10:09:00 -04:00
scottjehl
28bb987729 added a unit test for last-scroll remembering. 2011-09-07 09:16:02 -04:00
scottjehl
d68d5064bc finished last-scroll remembering implementation across pages in the history stack (regardless of whether they've been removed from the DOM since last appearance). 2011-09-07 08:15:00 -04:00
Ghislain Seguin
baded0d492 Merge pull request #2393 from dtao/patch-1
Fix for issue #2390: fixed typo: 'throttledResize' => 'throttledresize'
2011-09-06 22:33:37 -07:00
dtao
a4b9079cd7 fixed typo: 'throttledResize' => 'throttledresize' 2011-09-06 16:19:06 -07:00
scottjehl
0d98b8fad6 changed setting of lastScroll 2011-09-06 14:29:19 -04:00
scottjehl
97539ed3bd focus on title or page div 2011-09-06 12:58:14 -04:00
scottjehl
ebafc02cfe add tabindex to page element 2011-09-06 12:58:14 -04:00
scottjehl
003505a4b9 changed minscroll to 250, better organization of lastscroll 2011-09-06 12:56:46 -04:00
scottjehl
ac67e92cbb This change sets the "lastScroll" property to each urlHistory item object, allowing us to remember previous scroll distances when returning to a page that has since been removed from the DOM. Before this change, this number was stored in data on the page element, so it is lost when the page is removed after pagehide.
Also, this change removes a reference in memory that we were keeping to the $activeClickedLink on each page. We stored this in attempt to refocus a link after returning to a page. Unfortunately, it doesn't seem that this data can be retained after pages are removed from the DOM, outside of somehow remembering a unique selector string to reach that element again (which could be achieved by adding some overhead, ala http://stackoverflow.com/questions/2068272/getting-a-jquery-selector-for-an-element )
2011-09-06 12:56:46 -04:00
Kin Blas
7cce0c5573 Fixes for issue 1464 - No way to stop a link from being followed with some custom event (tap, taphold)
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.
2011-09-02 16:56:15 -07:00
John Bender
0b41fe808c added comment for the touches event proto addition 2011-09-02 13:56:37 -07:00
John Bender
c3dfcf6bdf fixed event tests to trigger on a dom element 2011-09-02 13:40:12 -07:00
Kin Blas
7bf048a214 I noticed that the code in the mouseup for the toggle switch was using a CSS3 transition, but calling the animationComplete() function which waits for an animationend event which will never come. This means we bind a new animationComplete() handler every time the toggle switch is clicked.
I removed the binding for the handler completely since it doesn't hurt to just leave the transition in place. I also removed the code that was setting the position of the slider since it really should only be set within the mouseup if the user did not change the switch setting (toggle).
2011-09-01 15:42:30 -07:00
Kin Blas
a27f7d355f Fix for issue 2346 - Flip toggle switches don't animate when tapped.
- Changed the target selector for ui-slider-handle-snapping from:

    div.ui-slider-handle-snapping

  to:

    a.ui-slider-handle-snapping

  to match the actual markup being generated.
2011-09-01 15:28:20 -07:00
Kin Blas
6759afff66 Fix for issue 1925 - Single tap triggers two actions, especially in android B1
- Trigger the list item and keyboard return/space key up to the "click" event instead of "vclick". This delays the dismissal of the custom select menu until the click event, thereby avoiding the case where the menu disappears before the browser dispatches it's synthesized mouse events (in the touch case) with a target of whatever element was underneath the menu.
2011-09-01 14:17:10 -07:00
Todd Parker
df8d6fa8d5 Merge pull request #2375 from globalmatt/master
Docs: Cleaned up "Prefetching & caching pages" page. Thanks globalmatt
2011-09-01 04:15:07 -07:00
Matt Doyle
5832890185 Docs: Cleaned up "Prefetching & caching pages" page
Renamed page for consistency and edited/clarified page content
2011-09-01 16:52:48 +10:00
gseguin
001e588c92 Fix for issue #2017. Clear active link on vclick so there can be only one active link at a time. 2011-08-31 21:46:39 -07:00
gseguin
e28ad6d95d re-added setting of $.mobile.activeBtnClass on selected option but only for single select lists 2011-08-31 13:33:52 -07:00
gseguin
d6da6fed64 piggy back on checkbox/radio to define background-color for ui-icon-checkbox-on 2011-08-31 13:32:44 -07:00
gseguin
4cb52c4908 set aria-selected on li element when li is selected 2011-08-31 11:16:11 -07:00
gseguin
830663d88b Changed look and feel of custom select options to match the checkbox/radio 2011-08-31 10:43:34 -07:00
gseguin
3dc4b9f9fa Removed activeBtnClass from selected option 2011-08-31 10:43:23 -07:00
gseguin
14c98e8ef7 Another version of https://github.com/jquery/jquery-mobile/pull/2363 by @jgable 2011-08-31 09:56:15 -07:00
John Bender
f679d30620 added ipv6 support to urlparse regex Fixes #2362 2011-08-30 15:59:46 -07:00
John Bender
23ee457309 whitespace in navigation helper tests 2011-08-30 15:52:31 -07:00
John Bender
41ef18aa56 Merge pull request #2357 from zachleat/master
Extra directory on the JS source files in ant build script
2011-08-29 22:32:40 -07:00
Todd Parker
dc230cbb63 Merge pull request #2360 from lagartoflojo/patch-1
Small typo fix
2011-08-29 17:34:02 -07:00
lagartoflojo
6528c09ab3 Small typo fix 2011-08-30 02:31:31 -03:00
Kin Blas
191b5e04a3 Fix for issue 2345 - Flip toggle switches *ALWAYS* toggle
- We now track whether or not the user has modified the value of the switch control. If so, we don't toggle it's value on mouseup.
2011-08-29 12:39:25 -07:00
John Bender
fd286444f4 replaceState *and* pushState are now required for $.support.pushState to be true 2011-08-29 10:18:40 -07:00
John Bender
07edada0dd added todo to centralize page dom removal and ref counting Fixes #2329 2011-08-29 10:09:22 -07:00
John Bender
bddc8c8ed2 small tweak to directedHashChange to make sure the right value is passed in for isBack 2011-08-29 09:12:39 -07:00
zachleat
65c26fd569 Build script js-sources had extra js directory in paths. 2011-08-29 11:12:13 -05:00
scottjehl
d63350ca6c set initial page div's data-url to location.pathname unless it has an ID on it. This fixes an issue where going back to the initial page will end up generating a new homepage rather than transitioning to the one already in the dom. 2011-08-28 00:06:27 -04:00
scottjehl
6de76168af Clarified the documentation around the purpose of the pagebeforecreate event and removed the pagebeforecreate return value check, as returning beforecreate false is no longer relevant now that all plugins auto-init externally, rather than inline in the page plugin. 2011-08-27 11:26:16 -04:00
scottjehl
10e2d5a61a previous commit should not have switched the order of trigger and add classes. Reverted, with cleanup still in place. 2011-08-27 11:07:21 -04:00
scottjehl
ce5ce102dc A little simplification in the page plugin 2011-08-27 10:58:46 -04:00
John Bender
a3487e620d simplified the default hash handling prevention back to somthing akin to @scottjehl's original implementation 2011-08-27 02:47:54 -07:00
John Bender
76d5c49b78 minor refactor and check for defined attr 2011-08-27 01:01:54 -07:00
John Bender
6b010492b2 minor refactors in nav and pushstate for clarity 2011-08-27 01:01:54 -07:00