Skip to content

Commit d67111c

Browse files
committed
Editable: highlight element on mouseover, except when editing.
1 parent 1792c6a commit d67111c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.editable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ $.widget( "ui.editable", {
9292

9393
this.element.removeClass( highlightStateClass );
9494

95-
if ( $this.is( this.element ) || $this.hasClass( placeholderClass ) ) {
95+
if ( !this.editing && ( $this.is( this.element ) || $this.hasClass( placeholderClass ) ) ) {
9696
this.element.addClass( highlightStateClass );
9797
return;
9898
}
@@ -108,10 +108,12 @@ $.widget( "ui.editable", {
108108
},
109109

110110
_show: function() {
111+
this.editing = undefined;
111112
this.element.html( this.value() || this._placeholder() );
112113
},
113114

114115
_edit: function() {
116+
this.editing = true;
115117
this.element.html( this._form() );
116118
this._formEvents();
117119
},

0 commit comments

Comments
 (0)