kopia lustrzana https://github.com/miklobit/TiddlyWiki5
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
rodzic
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
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue