From 2c678a10ae14405ccedf53ac658cc198f8612a5c Mon Sep 17 00:00:00 2001 From: vitalets <noginsk@rambler.ru> Date: Sun, 23 Jun 2013 19:51:47 +0400 Subject: [PATCH] do not set transparent bg color directly in style --- src/element/editable-element.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/element/editable-element.js b/src/element/editable-element.js index 8550c1f..1511595 100644 --- a/src/element/editable-element.js +++ b/src/element/editable-element.js @@ -390,16 +390,19 @@ Makes editable any HTML element on the page. Applied as jQuery method. //highlight when saving if(this.options.highlight) { var $e = this.$element, - $bgColor = $e.css('background-color'); + bgColor = $e.css('background-color'); $e.css('background-color', this.options.highlight); setTimeout(function(){ - $e.css('background-color', $bgColor); + if(bgColor === 'transparent') { + bgColor = ''; + } + $e.css('background-color', bgColor); $e.addClass('editable-bg-transition'); setTimeout(function(){ $e.removeClass('editable-bg-transition'); }, 1700); - }, 0); + }, 10); } //set new value