workaround more missing click events
This commit is contained in:
parent
64cf14e19e
commit
eec87b5513
|
@ -34,7 +34,7 @@ function positioningWorkaround($fixedElement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fixedElement.style.top = window.scrollY + iPadOffset + 'px';
|
fixedElement.style.top = window.scrollY + iPadOffset + 'px';
|
||||||
}, 500);
|
}, 400);
|
||||||
|
|
||||||
|
|
||||||
if (fixedElement.style.position !== 'absolute') {
|
if (fixedElement.style.position !== 'absolute') {
|
||||||
|
@ -68,12 +68,22 @@ function positioningWorkaround($fixedElement) {
|
||||||
self.addEventListener('blur', blurred);
|
self.addEventListener('blur', blurred);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function attachTouchStart(elem, fn) {
|
||||||
|
if (!$(elem).data('listening')) {
|
||||||
|
elem.addEventListener('touchstart', fn);
|
||||||
|
$(elem).data('listening', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const checkForInputs = _.debounce(function(){
|
const checkForInputs = _.debounce(function(){
|
||||||
|
$fixedElement.find('button,a').each(function(){
|
||||||
|
attachTouchStart(this, function(evt){
|
||||||
|
evt.preventDefault();
|
||||||
|
$(this).click();
|
||||||
|
});
|
||||||
|
});
|
||||||
$fixedElement.find('input,textarea').each(function(){
|
$fixedElement.find('input,textarea').each(function(){
|
||||||
if (!$(this).data('listening')) {
|
attachTouchStart(this, positioningHack);
|
||||||
this.addEventListener('touchstart', positioningHack);
|
|
||||||
$(this).data('listening', true);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue