fix editing empty values
This commit is contained in:
parent
0957500476
commit
0aa4c42ecf
1 changed files with 6 additions and 1 deletions
|
@ -78,10 +78,15 @@ Ox.EditableContent = function(options, self) {
|
|||
|
||||
function edit() {
|
||||
if (self.options.editable && !self.editing) {
|
||||
var value = formatInputValue();
|
||||
self.$value
|
||||
.text(formatInputValue() || ' ')
|
||||
.addClass('OxEditableContentInput')
|
||||
.attr({contenteditable: true});
|
||||
if (value) {
|
||||
self.$value.text(value);
|
||||
} else {
|
||||
self.$value.html(' ');
|
||||
}
|
||||
self.editing = true;
|
||||
that.gainFocus();
|
||||
setTimeout(updateSelection, 50);
|
||||
|
|
Loading…
Reference in a new issue