From 83eb368f403c92e4d3d154d015ce4f46a89f57d4 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Tue, 19 Jun 2012 10:39:13 +0100 Subject: [PATCH] Temporarily removed the popup zapper This implementation is too slow and cumbersome; we'll replace it with something else soon --- core/modules/startup.js | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/core/modules/startup.js b/core/modules/startup.js index a283a4588..9c5b9e1d0 100644 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -49,27 +49,27 @@ exports.startup = function() { // Host-specific startup if($tw.browser) { // Install the popup zapper - document.body.addEventListener("click",function(event) { - // Is the click within a popup? - var inPopup = false, - e = event.target; - while(e !== document) { - if($tw.utils.hasClass(e,"tw-popup")) { - inPopup = true; - } - e = e.parentNode; - } - // If we're not in a popup, then send out an event to cancel all popups - if(!inPopup) { - var cancelPopupEvent = document.createEvent("Event"); - cancelPopupEvent.initEvent("tw-cancel-popup",true,true); - cancelPopupEvent.targetOfCancel = event.target; - var controllers = document.querySelectorAll(".tw-popup-controller"); - for(var t=0; t