Commit graph

1530 commits

Author SHA1 Message Date
gseguin
6f5a7d1266 Fix for issue #2404
Collapsible are collapsed by default
2011-09-08 13:34:58 -04:00
scottjehl
f49e69ef84 disabled iOS5 improvements by default. Can be enabled by binding to mobileinit and setting $.mobile.touchOverflowEnabled = true; 2011-09-08 13:26:33 -04:00
scottjehl
b645781f4d implemented native overflow scrolling based on support for -[prefix]-overflow-scrolling: touch. True fixed headers and footers come supported as well. 2011-09-08 12:38:50 -04:00
scottjehl
bc036b91b0 Clock tap is busted, so this logic is here but commented-out 2011-09-08 12:38:50 -04:00
scottjehl
fda71670b4 reset scrollTop to 0, not defaultHomeScroll 2011-09-08 12:38:50 -04:00
scottjehl
1a524756f3 added a pre-transition class to set pages to display: block early and allow for their scrollTop and focus to be set before they are shown. 2011-09-08 12:38:50 -04:00
scottjehl
440be55f2b changed the name of the overflow support test and class to touchOverflow / touch-overflow 2011-09-08 12:38:50 -04:00
scottjehl
dae560d67f added support test & html class for overflow-scrolling-touch 2011-09-08 12:38:49 -04:00
scottjehl
2f63fdf3ec Merge remote branch 'origin/master' 2011-09-08 12:32:27 -04:00
scottjehl
bf02fc880d increased timeout that waits for a potential hashchange event to fire as a result of pop. 2011-09-08 12:31:59 -04:00
Kin Blas
fcbd4c3030 Merge branch 'master' of https://github.com/jquery/jquery-mobile 2011-09-08 09:24:16 -07:00
Kin Blas
78041bc7c9 Added path.isFirstPageUrl() which is now called from loadPage() when trying to determine if the URL being loaded refers to a page that is already in the DOM. This will prevent us from duplicating the first-page in the main application document.
Also checking in the first example of how to use the pagebeforechange notification to allow for dynamically updating and re-using a page that is already in the DOM.
2011-09-08 09:21:31 -07:00
scottjehl
db3dbc04d2 Merge remote branch 'origin/master' 2011-09-08 11:59:43 -04:00
scottjehl
7be8311d4e added location.search to the original page data-url 2011-09-08 11:58:55 -04:00
Kin Blas
04623c21cf Merge branch 'master' into changepage-prevent 2011-09-07 18:07:21 -07:00
Kin Blas
6aa8c8f3b0 - Added "fromPage" option to changePage(). This used to be in there before the navigation re-work, I just added it back in.
- Added "dataUrl" option to changePage(). This allows a caller to specify a page element to change to, but specify an alternate URL for location display purposes. This is useful for dynamic applications that re-use and over-write existing page content to avoid overwhelming the DOM.

- Renamed the "beforechangepage" and "changepage" events to "pagebeforechange" and "pagechange" respectively. This was done to match the page widget naming of its notifications. Left the triggers for the old events in place but with DEPRECATED comments.

- Renamed the properties of the data object passed to the page events.
2011-09-07 18:03:38 -07: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
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
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
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
Kin Blas
701b381cc4 Couple of modifications to changePage():
- Moved the setting of isPageTransitioning *AFTER* the beforechangepage notification.

- Modified the trigger("beforechangepage") call to pass the args to changePage() as an object since trigger only expects one data arg.
2011-09-06 16:56:20 -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
scottjehl
522b48ee84 started on the change to allow default prevention on beforechangepage 2011-09-05 13:05:57 -04: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
4cb52c4908 set aria-selected on li element when li is selected 2011-08-31 11:16:11 -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
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
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
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
John Bender
82cce1fa60 fix the chrome bug and reduce the number of crazy hash juggles we do 2011-08-27 01:01:54 -07:00
John Bender
328d58b2e9 fixed role retention issue from clearing the dom cache 2011-08-27 01:01:54 -07:00
John Bender
3a13a6ec75 renamed replacestate key handling method 2011-08-27 01:01:53 -07:00
John Bender
b569c1cc8b fix for dialog and subpage key url issues with replace state 2011-08-26 14:54:27 -07:00
John Bender
49cf3af91a Merge branch 'replacestate-external' 2011-08-25 13:05:54 -07:00
John Bender
df9e23390f extra comments for clarity 2011-08-25 11:51:01 -07:00