Hi
The code below prevents zooming on web page.
How to do the same with TMS webCore as
If I apply this code to main page or on any event on the form it has no effect.
<script>
// Prevent zoom using keyboard shortcuts (Ctrl/Cmd + + or -)
document.addEventListener('keydown', function(event) {
if ((event.ctrlKey || event.metaKey) && (event.key === '+' || event.key === '-' || event.key === '0')) {
event.preventDefault();
}
});
// Prevent zoom using touch gestures (pinch)
document.addEventListener('wheel', function(event) {
if (event.ctrlKey) {
event.preventDefault();
}
}, { passive: false });
// Prevent double-tap to zoom
let lastTouchEnd = 0;
document.addEventListener('touchend', function(event) {
let now = (new Date()).getTime();
if (now - lastTouchEnd <= 300) {
event.preventDefault();
}
lastTouchEnd = now;
}, false);
</script>