Fix: preventDefault() forbid checking checkbox.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 07 Jun 2015 12:30:26 +0300
changeset 159 2709c9ff04f0
parent 158 896cd3541ece
child 160 93c44d730198
child 165 4579c59e7e6b
Fix: preventDefault() forbid checking checkbox.
2048.html
--- a/2048.html	Wed Jan 07 19:58:44 2015 +0200
+++ b/2048.html	Sun Jun 07 12:30:26 2015 +0300
@@ -359,7 +359,7 @@
     ui.board = {};
     ui.board.val2048Dom = document.getElementById('2048');
     ui.board.val2048Dom.addEventListener("click", function(event) {
-      event.preventDefault(); event.stopPropagation();
+      event.stopPropagation();
       ui.board.update(ui.board.position);
       localStorage.val2048 = ui.board.val2048Dom.checked;
       event.target.blur();