Thank you Tones for your answer.
Unfortunately, it does not solve my issue: to have different background
color on each label when it is selected.
For instance a green background when yes is selected and red one when no is
selected.
After investigation, I wonder if there is not something to modify in the
radio widget:
I have tried to add a this.refreshSelf();
in RadioWidget.prototype.refresh function of the widget
under the if(changedTiddlers[this.radioTitle]) condition
and it works now without observable side effect!
However I am not a developper therefore it may be a mistake to do this.
Best regards,
Eskha
Le mardi 24 novembre 2020 à 00:21:01 UTC+1, TW Tones a écrit :
> Eskha,
>
> I used your minimal test case on edge and it is not working through the
> Test tiddler (Via the view template) although it works in Chrome and
> Firefox.
>
> However I changed the CSS to the following and it works in edge.
>
> *.tc-radio-selected {*
> *background-color: #ffc;*
> *}*
>
> I do not know why but I think your use of label is treated differently.
>
>
> Regards
> Tones
> On Saturday, 21 November 2020 at 04:25:15 UTC+11 Eskha wrote:
>
>> Hello,
>>
>> I have an issue with style refresh while using RadioWidget in a view
>> template element.
>>
>>
>> I am using Edge - Version 86.
>>
>> I have defined a style to use for the label of a a radio button input
>> when it is selected (by using the "tc-radio-selected"). This is working
>> when I directly use the RadioWidget in a tiddler.
>> However, if I use the RadioWidget in a tiddler tagged with
>> "$:/tags/ViewTemplate", the style is not refreshed unless I edit the
>> tiddler or close it then open it again.
>>
>>
>> Here is a minimal test case with three tiddlers:
>>
>> title: Test Template
>> tags: $:/tags/ViewTemplate
>>
>> <$radio field="test-field" value="Y">Yes</$radio>
>> <$radio field="test-field" value="N">No</$radio>
>>
>>
>> title: Test CSS
>> tags: $:/tags/Stylesheet
>>
>> label.tc-radio-selected {
>> background-color: #ffc;
>> }
>>
>>
>> title: Test
>>
>> <$radio field="test-field" value="Y">Yes</$radio>
>> <$radio field="test-field" value="N">No</$radio>
>>
>> My question: How can I fix it?
>> (Am i doing something wrong? Is-it a widget issue? An internet browser
>> issue? à
>>
>> Best regards,
>>
>> Eskha
>>
>>
--
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/befd352e-ece7-49a2-9951-06c75bab951cn%40googlegroups.com.