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.
print-window-tiddler
Jermolene 2014-11-22 10:19:03 +00:00
rodzic 7d3d2ba3fe
commit d6c5e51501
2 zmienionych plików z 2 dodań i 4 usunięć

Wyświetl plik

@ -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();
}

Wyświetl plik

@ -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
};