TW5 Popup flashing when used with focusPopup

113 views
Skip to first unread message

Danielo Rodríguez

unread,
Apr 15, 2015, 7:58:42 AM4/15/15
to tiddl...@googlegroups.com

Hello,

I'm experiencing a behavior that I can not understand. I'm trying to use a drop-down to give the user a list of values to choose from while he is typing. Everything seems correct to me, and when the edit field gains the focus the popup is opened, but in the same second it is closed. I can't understand why. It is even more "weird" if I make another edit field to trigger the same popup: it works as expected. The only difference between both fields is that one is placed before the transclusion of the popup tiddler and the other is placed after. So the order matters


Here is the code with both fields:


<$linkcatcher to="$:/state/searchNreplace/search">
<$edit-text tiddler="$:/state/searchNreplace/search" tag="input" default="" placeholder="search" focusPopup="$:/state/regexDropDown"/>
<$transclude tiddler="$:/text-tools/ui/regex-dropdown" mode="inline"/>
<$edit-text tiddler="$:/state/searchNreplace/replace" tag="input" default="" placeholder="replace" focusPopup="$:/state/regexDropDown"/>
</$linkcatcher>


And here is the transcluded tiddler body:

<div class="tc-block-dropdown-wrapper">
<$reveal state="$:/state/regexDropDown" type="nomatch" text="" default="">
<div class="tc-block-dropdown tc-edit-type-dropdown">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/regexp]]"><$link to={{!!regexp}}><$transclude field="description"/></$link>
</$list>
</div>
</$reveal>
</div>


Why?

thanks in advance.

Danielo Rodríguez

unread,
Apr 15, 2015, 8:01:15 AM4/15/15
to tiddl...@googlegroups.com
I checked it on TW.com and the behavior is exactly the same. Just copy and paste the code of both tiddlers. The title of the transcluded tiddler should be $:/text-tools/ui/regex-dropdown

Jeremy Ruston

unread,
Apr 17, 2015, 9:36:07 AM4/17/15
to TiddlyWiki
Hi Danielo

I think there's a couple of problems. First, the reveal widget should have type="popup". Secondly, the strategy of reusing the same dropdown content across two different text inputs won't work unless you qualify the state title.

Best wishes

Jeremy.


On Wed, Apr 15, 2015 at 1:01 PM, Danielo Rodríguez <rdan...@gmail.com> wrote:
I checked it on TW.com and the behavior is exactly the same. Just copy and paste the code of both tiddlers. The title of the transcluded tiddler should be $:/text-tools/ui/regex-dropdown

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/c9d5f1bc-fce7-43b5-be66-990d5d26e8a3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Danielo Rodríguez

unread,
Apr 17, 2015, 12:17:01 PM4/17/15
to tiddl...@googlegroups.com
Hello Jeremy,

I'll change the type of the drop down to popup and let you know if that was the problem.

>Secondly, the strategy of reusing the same dropdown content across two different text inputs won't work unless you qualify the state title.

I don't have the intention to use this drop down on both input fields. It was just for testing purposes. Anyway I can't use the qualify macro because the popup tiddler is being transcluded and I suppose the rendering tree will not be the same than the field's tree.

Jeremy Ruston

unread,
Apr 17, 2015, 12:31:10 PM4/17/15
to TiddlyWiki
> Anyway I can't use the qualify macro because the popup tiddler is being transcluded and I suppose the rendering tree will not be the same than the field's tree.

You can get around that problem by using the set widget to assign a qualified value to a variable in an outer scope, and then reference that variable in both places.

<$set name="v" value=<<qualify "$:/state/mygoodstate">>>
...
<$reveal state=<<v>>
etc.

Best wishes

Jeremy.


--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.

Danielo Rodríguez

unread,
Apr 17, 2015, 1:54:01 PM4/17/15
to tiddl...@googlegroups.com, jeremy...@gmail.com

You can get around that problem by using the set widget to assign a qualified value to a variable in an outer scope, and then reference that variable in both places.

<$set name="v" value=<<qualify "$:/state/mygoodstate">>>
...
<$reveal state=<<v>>
etc.

Hello Jeremy.

Thank you very much. I'll go for that. 

Coming back to the clipping popup, I'm still experiencing the same problem after changing the type to popup. As long as I keep the mouse button pressed while giving focus to the edit field, the popup keeps open, but as soon as I release the button the popup dissapears. Have you checked the code I provided? 

Jeremy Ruston

unread,
Apr 18, 2015, 11:49:11 AM4/18/15
to Danielo Rodríguez, TiddlyWiki
Hi Danielo

Thank you very much. I'll go for that. 

Coming back to the clipping popup, I'm still experiencing the same problem after changing the type to popup. As long as I keep the mouse button pressed while giving focus to the edit field, the popup keeps open, but as soon as I release the button the popup dissapears. Have you checked the code I provided? 

No, I was in a rush yesterday - it'd very helpful if you can post a demo to TiddlySpot; setting up manual tiddlers is quite time consuming and error prone.

Many thanks,

Jeremy.

Danielo Rodríguez

unread,
Apr 21, 2015, 9:41:30 AM4/21/15
to tiddl...@googlegroups.com, jeremy...@gmail.com, rdan...@gmail.com
Hello Jeremy,

Sorry for the late response. Please find an example TW attached.
popupIssue.html
Reply all
Reply to author
Forward
0 new messages