On Sunday, October 18, 2015 at 12:09:02 PM UTC-7, FrD wrote:
>
> Thanks a lot for the answer. It works well except that the button 
> appearance is weird as it retains the style of a clicked button.
> Anyway this trick should be in the doc at tiddlywiki.com !
>

There's another way to approach the problem...

First, use "tc-popup-keep" on the <$reveal> to suppress closing when 
clicking on any element inside the popup (i.e., the usual "sticky" popup).

Then, to dismiss the popup from a button contained within it, you would 
have that button delete the state tiddler for the reveal (which will make 
it go away)
   <$action-deletetiddler tiddler="..."/>

thus:
<$button popup="$:/state/popup/something">click</$button>
<$reveal type="popup" state="$:/state/popup/something"
   class="tc-drop-down tc-popup-keep">
   <$button> click and stay open
      <$action-setfield ... />
   </$button>
   <$button> click and close
      <$action-setfield ... />
      <$action-deletetiddler $tiddler="$:/state/popup/something"/>
   </$button>
</$reveal>

enjoy,
-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/16533f60-5328-4297-aacc-b747c91aa44a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to