Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#15541 closed defect (invalid)

dijit.form.Button display:none to display:inline doesn't work.

Reported by: charly Owned by:
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:



I have created a dijit.form.button with style display none, like this

<input type="button" style="display: none"
       iconClass:'dijitEditorIcon dijitEditorIconSave',

Later I have changed the display to inline, like this


HTML output:

<span role="presentation" class="dijit dijitReset dijitInline dijitButton" style="display: inline;" widgetid="saveButtonUpdateWithTransfer">

<span role="presentation" data-dojo-attach-event="ondijitclick:_onClick" class="dijitReset dijitInline dijitButtonNode">

<span aria-labelledby="saveButtonUpdateWithTransfer_label" role="button" data-dojo-attach-point="titleNode,focusNode" class="dijitReset dijitStretch dijitButtonContents" tabindex="0" id="saveButtonUpdateWithTransfer" style="-moz-user-select: none; display: none;">

<span data-dojo-attach-point="iconNode" class="dijitReset dijitInline dijitIcon dijitEditorIcon dijitEditorIconSave"></span>

<span class="dijitReset dijitToggleButtonIconChar">●</span>

<span data-dojo-attach-point="containerNode" id="saveButtonUpdateWithTransfer_label" class="dijitReset dijitInline dijitButtonText">Save and Close with transfer</span>

<input type="button" data-dojo-attach-point="valueNode" role="presentation" tabindex="-1" class="dijitOffScreen" value=""></span>

Problem: I don't see the label, because the display style is none.


dijit.byId('saveButton').set('style','display:inline');"saveButton", "display", "inline");


Change History (2)

comment:1 Changed 10 years ago by bill

Component: GeneralDijit - Form
Resolution: invalid
Status: newclosed

Well, depending on the browser, Button is display:inline-block, not display:inline, so you are setting display to an invalid value.

I'd suggest that instead of modifying style, you add/remove a "hidden" class (or use the "dijitHidden" class).

comment:2 Changed 10 years ago by charly

Thank you very much. But I miss required documentations.

Note: See TracTickets for help on using tickets.