I'm struggling with popups.
I have a popup, triggered by a button, that transcludes a tiddler containing two buttons.
The behaviour I'm looking for is :
- the first button when clicked does something (it calls <$action-setfield .../>), and does not close the popup,
- the second button also makes a change to a field and closes the popup.
The hard piece is for the first button not to close the popup. Is it possible ?
Thanks
FrD
The hard piece is for the first button not to close the popup. Is it possible ?
Thanks for answering.
I've tried your scenario with the popup modifying a field in another tiddler (other than the calling tiddler). The popup is closed anyway.
I've tried to dig in some js files (core/modules/utils/dom/popup.js or reveal.js) but I cannot make much sense of it (too difficult for me for now !)
Maybe there is a way of "forcing" the state of a popup but I can't find how.
FrD
<$button popup="$:/temp/testpopup">click to test</$button>
<$reveal state="$:/temp/testpopup" type="popup"
class="tc-drop-down">
<$button class="tc-popup-handle"> click button - stay open</$button>
<$button> click button - close popup</$button>
</$reveal>
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 !
FrD
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 !
<$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>have tried the second solution on the tablet. Works perfectly. Will use it for my use-case.
Thanks
FrD