Skip to content

Commit

Permalink
取消preventdefault
Browse files Browse the repository at this point in the history
  • Loading branch information
llan committed Jan 23, 2017
1 parent 3fa3bd5 commit 03b9ca3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion first-step/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Block {
*/
move() {
document.onkeydown = (e)=> {
e.preventDefault();
let activeModel = document.querySelector('.activityModel'),
left = parseInt(activeModel.style.left) ? parseInt(activeModel.style.left) : 0,
top = parseInt(activeModel.style.top) ? parseInt(activeModel.style.top) : 0;
Expand Down
1 change: 0 additions & 1 deletion second-step/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class Block {
*/
move() {
document.onkeydown = (e)=> {
e.preventDefault();
let activeModel = document.querySelector('.activityModel'),
left = parseInt(activeModel.style.left) ? parseInt(activeModel.style.left) : 0,
top = parseInt(activeModel.style.top) ? parseInt(activeModel.style.top) : 0;
Expand Down

0 comments on commit 03b9ca3

Please sign in to comment.