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
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
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
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
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
John Bender
f679d30620
added ipv6 support to urlparse regex Fixes #2362
2011-08-30 15:59:46 -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
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
b569c1cc8b
fix for dialog and subpage key url issues with replace state
2011-08-26 14:54:27 -07:00
John Bender
44eaf7707b
fix broken hash on dialog after initial page load
2011-08-25 10:49:51 -07:00
John Bender
af0e1f5d7e
whitepasce in nav
2011-08-25 10:49:51 -07:00
gseguin
9f3836e7b1
Fix for issue #1405 : Moved assignment of $activeClickedLink to the vclick handler in charge of adding the active state
2011-08-17 17:32:55 -07:00
scottjehl
ee17b4f05c
Ensure that navigating backwards through dialogs works as expected when domCache is false (which is the default now).
2011-07-31 10:03:22 -04:00
scottjehl
be74405b49
Added a configurable timeout to $.mobile.loadPage to give pages that are being fetched from cache a little time to load before a loading message appears. We'll need to tweak this timer based on device testing to determine how long it takes on average to fetch a cached page. If the delay ends up needing to be longer than 300ms or so to suit some devices, it's probably not worth having this feature at all.
2011-07-30 08:33:04 -04:00
scottjehl
bdba60efd5
removed urlHistory references to (and use of) each entry's "page" property, which kept a reference to the DOM elements of each page that had been loaded. This fixes leaking memory on removed pages, and outsources page requests to the browser cache (for real this time :) ).
2011-07-29 19:51:17 -04:00
John Bender
50acf2eb7c
fix to use options defined on page widget to determing domCache settings
2011-07-29 12:55:40 -07:00
John Bender
27b4ba1691
ajaxDomCaching -> domCache
2011-07-29 10:10:26 -07:00
John Bender
d716f3e9e7
moved dom cache check above the enhance to let widgets unbind parent page hide behaviour. added parent removal to listview special remove
2011-07-29 10:10:25 -07:00
scottjehl
a8c3859d84
using regular data method to access widget
2011-07-29 10:10:25 -07:00
scottjehl
dc054a10e7
implemented ajax dom caching option of the page plugin, which can be overridden by page options or data attribute. Includes unit test to support feature.
2011-07-29 10:10:25 -07:00
Ghislain Seguin
d1e8083f15
Merge pull request #2152 from webmynd/master
...
Consider data-role when picking page transition in changePage
2011-07-27 10:04:39 -07:00
Samuel Padou
051855e94d
Bug 2064; Add try/catch block to prevent 'Unspecified error' when we use an IFrame on IE9
2011-07-27 14:53:27 +02:00
James Brady
9cf3a60dee
Consider data-role when picking page transition.
...
Re-use existing "isDialog" variable in changePage,
instead of just looking at settings.role.
2011-07-27 12:24:41 +01:00
scottjehl
1a828594f5
default for loadPage should be to not show the loading message, since its default use case is to fetch a page that is not yet active. However, changePage should cause it to show because loadPage is being called during a page change.
2011-07-21 08:04:12 -04:00
scottjehl
259815d480
Make data-role=page elements optional. This change makes the framework more lenient with markup, and will ease integration with existing sites, as well as mashups with external content. Unit tests included. Fixes #2096
2011-07-17 14:52:49 -04:00
scottjehl
f84ceb12ed
Merge remote branch 'origin/master'
2011-07-15 16:30:03 -04:00
John Bender
ca173441d0
small refactor the the base url change for readability
2011-07-15 10:47:06 -07:00
scottjehl
a5d0a294e9
Implemented data-prefetch attribute for anchor elements. Presence of this attribute on an anchor will cause the referenced page to be preloaded when the parent page of that anchor is shown. Fixes #1819 .
2011-07-15 13:16:31 -04:00
John Bender
d827be3bf2
relative url change per Kin Blas's last pre-vacation request
2011-07-13 16:04:24 -07:00
John Bender
b761496ece
moved typeof check to jQuery.type()
2011-07-07 09:22:24 -07:00
John Bender
bf9c071900
whitespace in navigation
2011-07-07 09:19:16 -07:00
Ghislain Seguin
2deeee14d7
More elegant fix for #1990
...
Re-use $.mobile.allowCrossDomainPages & call deferred.reject to notify caller of failure
2011-06-30 13:40:06 -07:00
Ghislain Seguin
8117f12ad5
Coding standards
2011-06-29 21:03:12 -07:00
Ghislain Seguin
b02e19891a
Replace $.noop by function that throws to not fail silently
2011-06-29 21:02:53 -07:00
Ghislain Seguin
5fe310600f
Fix for #1990 : Introducing $.mobile.ajaxCrossDomainEnabled defaults to false
2011-06-29 20:00:12 -07:00
Kin Blas
2b51355656
Switch back to processing link clicks on the "click" event. It really is the only reliable way across all the devices we support.
...
Also, remove all references to useFastClick.
2011-06-29 17:38:00 -07:00
Kin Blas
aff87cc9f1
Fix for the mysterious "page is too large" error Todd and Scott were seeing on Blackberry 5 prior to shipping jQM beta 1.
...
Turns out this little code was enough to invoke the error:
"/dir1/dir2".replace(/\/?/, "");
Rewrote the regexp in path.makePathAbsolute() that was stripping leading slash, and trailing filename/slash. This gets around the problem.
Special thanks to @adambiggs for helping me test 33 iterations when trying to narrow down what in jquery.mobile.navigation.js was choking BB5.
2011-06-27 16:50:01 -07:00
Kin Blas
0d65a0d1c5
- Fixed issue #1923 - url of form is miscalculated
...
- Added code to calculate whether to choose the documentUrl or the page Url in the case where an action is not specified on a form element.
- Fixed bug in the navigation "submit" handler where an error was being thrown if "type" was not specified.
- Fixed typo "diabled" id typos in tests/unit/navigation/index.html.
- Added tests for form submissions with no action in both base and non-base specified cases.
2011-06-27 10:25:13 -07:00