Opened 9 years ago

Closed 9 years ago

#11692 closed defect (invalid)

dijit.Editor - Extend To Allow For Disabling of onChange Events (like dijits)

Reported by: OakBehringer Owned by:
Priority: high Milestone: tbd
Component: Editor Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

It would be nice to be able to disable the onChange events in dijit.Editor like one can with dijit.form elements. All it would take is to add an _onChangeActive flag to the dijit._editor.RichText class and adding an IF statement to the _onBlur function. The following dojo.extend adds the _onChangeActive flag and the IF statement to the _onBlur function:

dojo.extend(dijit._editor.RichText, {
	_onChangeActive: true,
	_onBlur: function(e) {
		this.inherited('_onBlur', arguments);
		var _c=this.getValue(true);
		if(_c!=this.savedContent){
			if (this._onChangeActive)
				this.onChange(_c);
			this.savedContent=_c;
		}
	}
});

Change History (3)

comment:1 Changed 9 years ago by bill

Component: GeneralEditor
Description: modified (diff)
Owner: anonymous deleted

I don't understand this ticket, form widgets don't have a feature for "disabling onChange events".

The two special things that form widgets support are:

  1. suppress onchange events via priorityChange=false flag for programmatic set calls: myWidget.set("value", 123, false)
  2. don't fire onChange events when the new value is the same as the old value

Doesn't seem like you are talking about either one of those?

comment:2 Changed 9 years ago by Jared Jurkiewicz

I don't understand this ticket, either.

comment:3 Changed 9 years ago by bill

Resolution: invalid
Status: newclosed

OK, I'm closing it given the lack of response (over two weeks).

Note: See TracTickets for help on using tickets.