Opened 11 years ago

Closed 11 years ago

#13191 closed enhancement (fixed)

fixed dijit.form.Button label

Reported by: gerhard presser Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.6.1
Keywords: button label Cc:
Blocked By: Blocking:


if I extend dijit.form.Button and set an fixed label for this widget type, and create such widget via markup, the label is allways empty.

this happens because


allways reads the source's innerHTML regardles if a label is allready set or the source has an innerHTML at all

I think the funktion should look something like:

_fillContent: function(/*DomNode*/ source){
			if(source && source.innerHTML && (!this.params || !("label" in this.params))){
				this.set('label', source.innerHTML);

Change History (3)

comment:1 Changed 11 years ago by bill

Doesn't it already look like that? The latest code is:

_fillContent: function(/*DomNode*/ source){
	// Overrides _Templated._fillContent().
	// If button label is specified as srcNodeRef.innerHTML rather than
	// this.params.label, handle it here.
	// TODO: remove the method in 2.0, parser will do it all for me
	if(source && (!this.params || !("label" in this.params))){
		this.set('label', source.innerHTML);

comment:2 Changed 11 years ago by Douglas Hays

Status: newassigned

comment:3 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [25491]) Fixes #13191. Allow for redefinition of label by Button subclass. Add automated test.

Note: See TracTickets for help on using tickets.