jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.69k stars 2.41k forks source link

Links failing on URI schemes other than http: #272

Closed alexisabril closed 13 years ago

alexisabril commented 13 years ago

<a href="/index.html">Index</a>

The above works as intended within jQuery Mobile, however with other schemes an error is thrown for a page that does not exist("Error loading page.").

Samples:

<a href="tel:+1-555-555-5555">Call</a>
<a href="mailto:me@my-domain.com">Email</a>

Tested in iOS 4.0.2 & Android 2.2

scottjehl commented 13 years ago

Removed the ajaxClick function and moved its logic into the live click event handler, where it is now refactored and simplified. Thx to Jeffrey Way for ideas that went into this refactor.

Also, clicks that are triggered on anchors will now be able to make a new http request, which improves listview behavior when clicking LIs that resolve to external urls.

Included in commit is a new demo/test page with various link types to make sure they behave as expected.

Closed by e736caebfe28fa8b0c3541ba678cbfe5d7968cab, Closed by e736caebfe28fa8b0c3541ba678cbfe5d7968cab