Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore events during the render phase #2482

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

LuLaValva
Copy link
Member

Description

  • There is a Google Chrome Bug where blur events are fired when elements are removed from the DOM (this behavior does not match that of other browsers). This causes issues when Marko removes elements during the render phase.
  • This PR changes Marko's behavior so that if an event happens during the render phase, handlers do not fire. Incidentally, this means behavior matches React for the blur case but not any of the other frameworks.

Checklist:

  • I have read the CONTRIBUTING document and have signed (or will sign) the CLA.
  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@LuLaValva LuLaValva self-assigned this Jan 31, 2025
Copy link

changeset-bot bot commented Jan 31, 2025

🦋 Changeset detected

Latest commit: 6f12b9b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@marko/runtime-tags Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.09%. Comparing base (622d328) to head (6f12b9b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2482   +/-   ##
=======================================
  Coverage   87.09%   87.09%           
=======================================
  Files         351      351           
  Lines       40056    40058    +2     
  Branches     2589     2588    -1     
=======================================
+ Hits        34885    34887    +2     
  Misses       5147     5147           
  Partials       24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DylanPiercey DylanPiercey merged commit 99c7428 into main Jan 31, 2025
10 checks passed
@DylanPiercey DylanPiercey deleted the ignore-events-during-render branch January 31, 2025 21:01
@github-actions github-actions bot mentioned this pull request Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants