Fix popup handling in Cecily and Zoomin view

Cecily and Zoomin story views use a document.body that is smaller than
the document.documentElement. We were just clearing the popups on
clicks on the document.body Clicks on the document element (ie, on the
background of the page) were not being trapped, meaning that you
couldn’t dismiss a popup.
This commit is contained in:
Jermolene 2014-11-22 10:19:03 +00:00
parent 7d3d2ba3fe
commit d6c5e51501
2 changed files with 2 additions and 4 deletions

View File

@ -78,9 +78,7 @@ exports.startup = function() {
// Host-specific startup
if($tw.browser) {
// Install the popup manager
$tw.popup = new $tw.utils.Popup({
rootElement: document.body
});
$tw.popup = new $tw.utils.Popup();
// Install the animator
$tw.anim = new $tw.utils.Animator();
}

View File

@ -18,7 +18,7 @@ Creates a Popup object with these options:
*/
var Popup = function(options) {
options = options || {};
this.rootElement = options.rootElement || document.body;
this.rootElement = options.rootElement || document.documentElement;
this.popups = []; // Array of {title:,wiki:,domNode:} objects
};