From f943e9870cb9929c197439a6016c0485fe4ddf72 Mon Sep 17 00:00:00 2001 From: wxik_noohle Date: Fri, 18 Dec 2020 14:36:33 +0800 Subject: [PATCH] currentTarget --- src/editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor.js b/src/editor.js index 46fe3ef..6e813db 100644 --- a/src/editor.js +++ b/src/editor.js @@ -341,8 +341,8 @@ function createHTML(options = {}) { sendEvent: function (type, data){ event.preventDefault(); event.stopPropagation(); - var id = event.target.id; - if ( !id ) event.target.id = id = generateId(); + var id = event.currentTarget.id; + if ( !id ) event.currentTarget.id = id = generateId(); _postMessage({type, id, data}); } }