New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading whitespace in href results in a synchronous load, when async is desired #4882

Closed
holtbp opened this Issue Aug 21, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@holtbp

holtbp commented Aug 21, 2012

Browsers: Chrome 21.0.1180.79, iOS 5.1 Safari, Safari 6
jQM Version: 1.0.1, 1.1.1, 1.2.0

Prerequisites:

  • An anchor tag with a leading whitespace in the href attribute exists on the page (example below).
  • AJAX navigation enabled
  • Link ajax data-attribute or rel will not cause a synchronous load

Steps:

  1. Load page
  2. Click on desired link with leading space in href

Expected: Asynchronous load occurs.

Actual: Synchronous load occurs, clearing the DOM of cached "pages"

@holtbp

This comment has been minimized.

Show comment
Hide comment
@holtbp

holtbp Aug 21, 2012

Updated the urlParseRE to ignore leading whitespace. That seems to work.

holtbp commented Aug 21, 2012

Updated the urlParseRE to ignore leading whitespace. That seems to work.

jefflembeck added a commit to jefflembeck/jquery-mobile that referenced this issue Oct 25, 2012

Changed urlParseRE to ignore space at beginning. This is expected
behavior in browsers. This used to result in pages changing to
"%20destination.html" instead of the now "destination.html". Fixes issue #4882

scottjehl pushed a commit that referenced this issue Oct 31, 2012

Scott Jehl
Merge branch 'master' into tables
* master: (24 commits)
  [select] Implement _destroy() -- Fixes #4661
  Changing ok out to equal; it is more appropriate for this test
  Changing test to make sure it fails when code change is not there
  Renamed class ui-selectmenu-hidden to ui-popup-hidden -- Fixes #5217
  [popup] Rename function _maybeRefreshTimeout to _expectResizeEvent
  [popup] "detached retina" fix - the window height on iStuff with a retina display seems to fluctuate by one pixel during scroll, causing a spurious resize event right after popup open, even though window size is constant during the entire opening sequence
  Added "mobileinit" handler to set up options
  Whitespace
  Changed urlParseRE to ignore space at beginning. This is expected behavior in browsers. This used to result in pages changing to "%20destination.html" instead of the now "destination.html". Fixes issue #4882
  List autodividers: use trim() to avoid issues with newlines and spaces in markup. Fixes #5197. Thanks @demonslord !
  [popup] Initiate resize expectation during orientationchange -- Fixes #5153
  Select: headers of custom select menus shouldn't inherit the popup corner styling. Fixes #5215.
  [popup] Correctly handle the case when the fallback transition is "none" -- Fixes #5189
  [custom select] Mark as closed after dialog closes - Re: #5195 - Thanks martenbohlin
  [slider] Adding new behaviour to widget definition
  [select] Adding new behaviour to widget definition
  [checkboxradio] Adding new behaviour to widget definition
  [formReset] New behaviour that allows form widgets to become aware of the fact that the form they are in has been reset
  [popup] Only rapid-open the popup if it is open -- Fixes #5157
  Updated third-party libs for Backbone/Require Demo App
  ...
@jefflembeck

This comment has been minimized.

Show comment
Hide comment
@jefflembeck

jefflembeck Jan 14, 2013

Contributor

Closed with above PR

Contributor

jefflembeck commented Jan 14, 2013

Closed with above PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment