Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* liveui: Now temporary value is saved before removing attributes (fi…

…xes #76)
  • Loading branch information...
commit e13c21059606572228016af25ae99c3a321d315e 1 parent c642166
@bminer authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 plugins/liveui.js
View
5 plugins/liveui.js
@@ -303,7 +303,8 @@
{
//Setup the new element query now because the 'id' attribute will be deleted soon
var newElementQuery = focus.id ? "#" + focus.id :
- "#" + focus.parentNode.id + " > [name=" + focus.name + "]"
+ "#" + focus.parentNode.id + " > [name=" + focus.name + "]",
+ tmpValue = focus.value;
//Save the selection, if needed
if($(focus).is("input[type=text],input[type=password],textarea"))
var selectionStart = focus.selectionStart,
@@ -336,7 +337,7 @@
if(document.activeElement === newElement)
{
//Set value to the temporary value and setup blur event handler to trigger `change`, if needed
- $(newElement).val(focus.value).blur(function(e) {
+ $(newElement).val(tmpValue).blur(function(e) {
$(this).unbind(e);
if(this.value !== oldValue)
$(this).trigger('change');

0 comments on commit e13c210

Please sign in to comment.
Something went wrong with that request. Please try again.