Skip to content

Commit

Permalink
fix(runtime): fix event listener not working in root-portal if the pa…
Browse files Browse the repository at this point in the history
…rent node also listening

NervJS#13312
  • Loading branch information
TheKonka committed Nov 15, 2023
1 parent 5fdf9ce commit 1b9a8a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-runtime/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function isHasExtractProp (el: TaroElement): boolean {
*/
export function isParentBinded (node: TaroElement | null, type: string): boolean {
let res = false
while (node?.parentElement && node.parentElement._path !== ROOT_STR) {
while (node?.parentElement && node.parentElement._path !== ROOT_STR && node.parentElement.nodeName !== 'root-portal') {
if (node.parentElement.__handlers[type]?.length) {
res = true
break
Expand Down

0 comments on commit 1b9a8a6

Please sign in to comment.