Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaSu authored Nov 3, 2020
1 parent 8a3a436 commit 66b077d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/render/dom/DOMRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function insertElement(fiber) {
if (after === null && dom === parent.lastChild) {
return;
}
if (dom.nextSibling && dom.nextSibling === after) {
return;
}
//插入**元素节点**会引发焦点丢失,触发body focus事件
Renderer.inserting = fiber.tag === 5 && safeActiveElement();
parent.insertBefore(dom, after);
Expand Down

0 comments on commit 66b077d

Please sign in to comment.