Opened 9 years ago

Closed 9 years ago

#11067 closed defect (invalid)

dijit._editor.RichText._onFocus seems incorrect

Reported by: Rawld Gill Owned by:
Priority: high Milestone: tbd
Component: Editor Version: 1.5.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

From [16801] the the method _onFocus has:

if(!this.disabled){
	if(!this._disabledOK){
		this.set('disabled', false);
	}
	this.inherited(arguments);
}

This seems to be setting disabled to false iff it is already false--which seems incorrect. Seems like the intent here is to enable a disabled instance when it gets the focus iff the _disabledOK attribute is false. If so, probably want:

this.disabled && !this.disableOK && this.set("disabled", false);

!this.disabled && this.inherited(arguments);

Change History (1)

comment:1 Changed 9 years ago by bill

Component: DijitEditor
Description: modified (diff)
Resolution: invalid
Status: newclosed

That disabledOK flag and the code quoted above is from [16801]. Yes, it's setting disabled to false when it's already false, in order to re-run the code in _setDisabledAttr(), because the first time _setDisabledAttr() was run it didn't complete successfully because the editor was hidden.

In other words the intent of that code is not to enable a disabled instance when it gets focus.

The _disabledOK flag means "_setDisabledAttr() was called and ran successfully".

Sounds like this isn't a bug.

Note: See TracTickets for help on using tickets.