You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 22:13:53 +01:00
Fixes for iPhone zoom on tap, and numeric keyboard
This commit is contained in:
@@ -63,9 +63,24 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
|
||||
// Check if device is an iPhone to prevent zoom on button press
|
||||
if (/iPhone|iPod|iPad/.test(navigator.userAgent) && !window.MSStream) {
|
||||
const buttons = document.querySelectorAll('button');
|
||||
buttons.forEach(button => {
|
||||
button.addEventListener('touchstart', function(e) {
|
||||
// Prevent default zoom behavior
|
||||
e.preventDefault();
|
||||
// Allow default button action after short delay
|
||||
setTimeout(() => {
|
||||
e.target.click();
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const textInput = $('#commandinput');
|
||||
|
||||
textInput.on('change', function (event) {
|
||||
textInput.on('change blur', function (event) {
|
||||
const inputValue = Number(textInput.val());
|
||||
// Check if the user agent contains 'iPhone'
|
||||
if (/iPhone/i.test(navigator.userAgent)) {
|
||||
|
||||
Reference in New Issue
Block a user