mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Update the reveal widget to set the tw-popup class
This commit is contained in:
parent
06a66cf24e
commit
b304e3fe40
@ -38,6 +38,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.renderChildren(domNode,null);
|
this.renderChildren(domNode,null);
|
||||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||||
this.positionPopup(domNode);
|
this.positionPopup(domNode);
|
||||||
|
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||||
}
|
}
|
||||||
if(!this.isOpen) {
|
if(!this.isOpen) {
|
||||||
domNode.setAttribute("hidden","true")
|
domNode.setAttribute("hidden","true")
|
||||||
@ -179,6 +180,8 @@ RevealWidget.prototype.updateState = function() {
|
|||||||
// Animate our DOM node
|
// Animate our DOM node
|
||||||
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
|
||||||
this.positionPopup(domNode);
|
this.positionPopup(domNode);
|
||||||
|
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
|
||||||
|
|
||||||
}
|
}
|
||||||
if(this.isOpen) {
|
if(this.isOpen) {
|
||||||
domNode.removeAttribute("hidden");
|
domNode.removeAttribute("hidden");
|
||||||
|
Loading…
Reference in New Issue
Block a user