update jquery mobile to use normal browser events

This commit is contained in:
Luke Pulverenti
2015-11-29 16:44:09 -05:00
parent 905a6c819e
commit 404073e540
7 changed files with 69 additions and 75 deletions
+15
View File
@@ -9,6 +9,21 @@
} else {
elem.setAttribute("src", url);
}
if (browserInfo.chrome && !browserInfo.mobile) {
if (!elem.classList.contains('noFade')) {
fadeIn(elem, 1);
}
}
}
function fadeIn(elem, iterations) {
var keyframes = [
{ opacity: '0', offset: 0 },
{ opacity: '1', offset: 1 }];
var timing = { duration: 200, iterations: iterations };
return elem.animate(keyframes, timing);
}
// Request Quota (only for File System API)
+5 -7
View File
@@ -2,9 +2,9 @@
function paperDialogHashHandler(dlg, hash, lockDocumentScroll) {
function onHashChange(e, data) {
function onHashChange(e) {
data = data.state;
var data = e.detail.state || {};
var isActive = data.hash == '#' + hash;
if (data.direction == 'back') {
@@ -25,7 +25,7 @@
dlg = null;
if (enableHashChange()) {
$(window).off('navigate', onHashChange);
window.removeEventListener('navigate', onHashChange);
if (window.location.hash == '#' + hash) {
history.back();
@@ -33,9 +33,7 @@
}
}
var self = this;
$(dlg).on('iron-overlay-closed', onDialogClosed);
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
dlg.open();
if (lockDocumentScroll !== false) {
@@ -46,7 +44,7 @@
window.location.hash = hash;
$(window).on('navigate', onHashChange);
window.addEventListener('navigate', onHashChange);
}
}