From ea73be17468b1bd02171c82e1fb21b1bc16ccd0e Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sat, 20 Oct 2012 23:17:30 -0400 Subject: Refactor handlerStack. Closes #657. Previously, handlerStack was designed only for removal of the handler right at the top of the stack. However, some handlers sought to remove themselves when they were not at the top of the stack, creating confusion. The new handlerStack ensures that such removal can always be done safely. --- lib/dom_utils.coffee | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/dom_utils.coffee') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 30530e0d..501e43a5 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -131,5 +131,9 @@ DomUtils = document.documentElement.appendChild(flashEl) setTimeout((-> DomUtils.removeElement flashEl), 400) + suppressEvent: (event) -> + event.preventDefault() + event.stopPropagation() + root = exports ? window root.DomUtils = DomUtils -- cgit v1.2.3