With the Ajax.InPlaceEditor control, if you set the externalControl option to an existing control, then you will be able to turn the editing mode on by both
1) Clicking on the field itseld.
2) clicking on the external control.
It should be one or the other (i.e. {1 or 2}, not {1 or {1 or 2}} ).
Imagine you have read-only fields and then a little 'edit' icon next to them. You want the readonly fields to be clickable (like a url), but editable also (when you click on the 'edit' icon, which is actually your externalControl). This cannot be done right now.
To fix it, just change the code in
control.js > Ajax.InPlaceEditor class > this.options = Object.extend({ ...
OLD (CURRENT) CODE
Event.observe(this.element, 'click', this.onclickListener);
Event.observe(this.element, 'mouseover', this.mouseoverListener);
Event.observe(this.element, 'mouseout', this.mouseoutListener);
if (this.options.externalControl) {
Event.observe(this.options.externalControl, 'click', this.onclickListener);
Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
NEW (PROPOSED) CODE
if (this.options.externalControl) {
Event.observe(this.options.externalControl, 'click', this.onclickListener);
Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
} else {
Event.observe(this.element, 'click', this.onclickListener);
Event.observe(this.element, 'mouseover', this.mouseoverListener);
Event.observe(this.element, 'mouseout', this.mouseoutListener);
}