1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-18 11:29:55 +00:00

Update the reveal widget to set the tw-popup class

This commit is contained in:
Jermolene 2013-11-12 22:02:43 +00:00
parent 06a66cf24e
commit b304e3fe40

View File

@ -38,6 +38,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
this.renderChildren(domNode,null);
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(!this.isOpen) {
domNode.setAttribute("hidden","true")
@ -179,6 +180,8 @@ RevealWidget.prototype.updateState = function() {
// Animate our DOM node
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tw-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(this.isOpen) {
domNode.removeAttribute("hidden");