How cancel e.preventDefault()?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
Hi!

Please help to cope with the task.

Click on .js-md-catalog-open to block for cellphones scaling:

$('.js-md-catalog-open').click(function() { document.addEventListener('gesturestart', function(e) { e.preventDefault(); }); });

Works.

As click on .js-overlay this lock right to cancel?

$(".js-overlay").on("click", function() { });
by | 9 views

1 Answer

0 like 0 dislike
removeEventListener?

UPD:
gesturestart and things like that are buggy high-level events with the same "high level" support, so I would try something like:
$('.js-md-catalog-open').on("click", function() { $("viewport").attr("content", "width=device-width, initial-scale=1.0, user-scalable=no"); }); $(".js-overlay").on("click", function() { $("viewport").attr("content", "width=device-width, initial-scale=1.0"); });
by

Related questions

0 like 0 dislike
1 answer
asked Aug 15, 2019 by SuperToster
0 like 0 dislike
1 answer
asked Jul 2, 2019 by SuperToster
0 like 0 dislike
1 answer
asked Jul 19, 2019 by SuperToster
0 like 0 dislike
1 answer
asked Jul 5, 2019 by SuperToster
0 like 0 dislike
1 answer
asked Apr 9, 2019 by doniyorbekm
110,608 questions
257,186 answers
0 comments
28,002 users