Skip to content

Commit fe66d20

Browse files
committed
Editable: Fixed setting initial widget value thru an option.
1 parent 0071318 commit fe66d20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.editable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $.widget( "ui.editable", {
3434
widgetEventPrefix: "edit",
3535

3636
options: {
37-
value: "",
37+
value: null,
3838
editor: "text",
3939
buttons: "outside",
4040
save: {
@@ -63,7 +63,7 @@ $.widget( "ui.editable", {
6363
},
6464

6565
_create: function() {
66-
if ( !this.value( $.trim( this.element.text() ) || this.options.value ) ) {
66+
if ( this.value( this.options.value ) || !this.value( $.trim( this.element.text() ) ) ) {
6767
this._show();
6868
}
6969
this._bind( this._events );

0 commit comments

Comments
 (0)