summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-06-17 16:33:01 +0800
committerCheng-Han, Wu2016-06-17 16:33:01 +0800
commita6a107eab9f8e9f5dc42b11ecdb9583d4f2a8685 (patch)
tree5001dee6c4c869333fab72ab799b1da93c08fa00 /public/js/index.js
parent614a97376dff04d06dae682a079da0ad3a6af76f (diff)
Update to remove data lines attributes in the patialUpdate to gain better performance
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 3ca0517c..dc5f928c 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -3003,10 +3003,10 @@ function partialUpdate(src, tar, des) {
function cloneAndRemoveDataAttr(el) {
if (!el) return;
- var rawEl = $(el).clone()[0];
- rawEl.removeAttribute('data-startline');
- rawEl.removeAttribute('data-endline');
- return rawEl;
+ var rawEl = $(el).clone();
+ rawEl.removeAttr('data-startline data-endline');
+ rawEl.find('[data-startline]').removeAttr('data-startline data-endline');
+ return rawEl[0];
}
function copyAttribute(src, des, attr) {