Skip to content

SimpleTextarea does not show placeHolder #205

@xmedeko

Description

@xmedeko

I have SimpleTextarea with placeHolder:

<textarea data-dojo-type="dijit/form/SimpleTextarea" data-dojo-props="placeHolder:'Text area placeholder'></textarea>

but the placeHolder is not shown, because although SimpleTextarea descents from TextBox, it changes templateString and the placeHolder has nowhere to attach in

dijit/form/TextBox.js

Lines 68 to 73 in 8ab4cdc

this._phspan = domConstruct.create('span', {
// dijitInputField class gives placeHolder same padding as the input field
// parent node already has dijitInputField class but it doesn't affect this <span>
// since it's position: absolute.
className: 'dijitPlaceHolder dijitInputField'
}, this.textbox, 'after');
(because this.textbox has no parentElement).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions