Skip to content

Commit

Permalink
阻止冒泡
Browse files Browse the repository at this point in the history
  • Loading branch information
rowthan committed Mar 2, 2018
1 parent be8a751 commit 48d5384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/whatsElement.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/whatsElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@

var deleteButton = createElement("div",deleteID)
deleteButton.innerText = 'x'
deleteButton.onclick = function () {
whatsElement.prototype.clean();
deleteButton.onclick = function (e) {
e.stopPropagation()
whatsElement.prototype.clean()
}
tip.appendChild(deleteButton);

Expand Down

0 comments on commit 48d5384

Please sign in to comment.