mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-25 04:46:55 +00:00
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:
parent
7d3d2ba3fe
commit
d6c5e51501
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user