Hi Eric,
This is the basic structure (below) that I'm using, which I got from you.
It solves the problem that when you use type="popup" in the reveal widget,
the reveal widget won't let you use your own positioning. The default
behavior puts the popup box off to the left, and in my case, off screen,
whereas I want to put it to the right of the current tiddler.
The problem now is that tc-popup-keep doesn't seem to be working. As soon
as you type in an edit box inside the div, it immediately closes the entire
popup.
This is 5.1.23 prerelease, so per Saq's suggestion I tried adding
cancelPopups="no" to the edit box, but that didn't seem to change the
behaviour.
Thanks!
Code and CSS below.
<$button class="tc-btn-invisible" popup=<<state-editor-settings>>
>{{$:/core/images/options-button}}</$button></span>
...
<$reveal type="nomatch" state=<<state-editor-settings>> text="" >
<div comment="THIS IS PSEUDO POPUP" class="nw-edit-settings tc-popup-keep
tc-drop-down" >
... edit boxes here ...
</div>
</$reveal>
This is the positioning that I'm applying via the CSS, in case that matters:
.nw-edit-settings {
right: -0.5em !important;
position: absolute;
z-index: 2;
top: 0.9em;
opacity: 1;
background-color: antiquewhite;
padding: 0.9em;
border: solid lightblue;
width: min-content;
border-radius: 1em;
}
On Wednesday, July 22, 2020 at 7:03:06 AM UTC-7, Eric Shulman wrote:
>
> On Wednesday, July 22, 2020 at 6:40:28 AM UTC-7, Mark S. wrote:
>>
>> Maybe this isn't possible. I would like to make a popup box that has an
>> input field that users can enter information into. I want the popup to
>> "stick" until someone clicks outside the box. Unfortunately, currently the
>> box closes as soon as a field is entered.
>>
>
> Use "tc-popup-keep" on the tc-drop-down element:
> <$button popup=<<qualify "$:/state/popup/something">>> button label
> </$button>
> <$reveal state=<<qualify "$:/state/popup/something">> type="popup">
> <div class="tc-drop-down tc-popup-keep"
> style="min-width:fit-content;padding:1em;">
> enter whatever here:
> <$edit-text tiddler="whatever" tag="input" placeholder=""
> default="" focus="true"/>
> </div>
> </$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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/75d7c61f-8167-47f7-8e8d-9ba8bcf08c34o%40googlegroups.com.