fix: ignore autoplay attribute mutations regardless of tagName case - #1921
Merged
Juice10 merged 1 commit intoSep 8, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 092f54b The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
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 |
roggernaut
force-pushed
the
fix/ignore-attribute-tagname-case
branch
3 times, most recently
from
September 8, 2026 09:33
1880d47 to
3e96bc7
Compare
ignoreAttribute compared the tag name against lowercase literals, but the attribute-mutation handler in rrweb passed the native uppercase target.tagName, so autoplay changes on video/audio elements were never ignored during live recording. Lowercase target.tagName once in the attribute-mutation handler and reuse it for the ignoreAttribute, transformAttribute, iframe and input checks. ignoreAttribute now takes an already-lowercased tag name and lowercases the attribute name too, so AUTOPLAY is matched as well. Fixes rrweb-io#1916 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
roggernaut
force-pushed
the
fix/ignore-attribute-tagname-case
branch
from
September 8, 2026 09:36
3e96bc7 to
092f54b
Compare
Contributor
Bundle Size ChangesSize change: +1.08 kB (+0.01%) | Total size: 10426.39 kB
|
| File | Base | PR | Diff |
|---|---|---|---|
all.cjs |
567.74 kB | 567.83 kB | +88 B (+0.02%) |
all.js |
567.41 kB | 567.50 kB | +88 B (+0.02%) |
all.umd.cjs |
570.95 kB | 571.04 kB | +88 B (+0.02%) |
all.umd.min.cjs |
269.07 kB | 269.07 kB | +1 B (+0.00%) |
browser-client - 669.93 kB -> 670.07 kB (+140 B (+0.02%))
| File | Base | PR | Diff |
|---|---|---|---|
browser-client.cjs |
192.10 kB | 192.15 kB | +52 B (+0.03%) |
browser-client.js |
191.87 kB | 191.92 kB | +52 B (+0.03%) |
browser-client.umd.cjs |
194.92 kB | 194.97 kB | +52 B (+0.03%) |
browser-client.umd.min.cjs |
91.05 kB | 91.03 kB | -16 B (-0.02%) |
record - 552.55 kB -> 552.68 kB (+140 B (+0.02%))
| File | Base | PR | Diff |
|---|---|---|---|
record.cjs |
158.41 kB | 158.46 kB | +52 B (+0.03%) |
record.js |
158.32 kB | 158.38 kB | +52 B (+0.03%) |
record.umd.cjs |
159.74 kB | 159.79 kB | +52 B (+0.03%) |
record.umd.min.cjs |
76.07 kB | 76.05 kB | -16 B (-0.02%) |
replay - 1406.98 kB -> 1407.10 kB (+125 B (+0.01%))
| File | Base | PR | Diff |
|---|---|---|---|
replay.cjs |
403.80 kB | 403.84 kB | +36 B (+0.01%) |
replay.js |
403.71 kB | 403.75 kB | +36 B (+0.01%) |
replay.umd.cjs |
406.78 kB | 406.82 kB | +36 B (+0.01%) |
replay.umd.min.cjs |
192.69 kB | 192.70 kB | +17 B (+0.01%) |
rrweb - 1913.36 kB -> 1913.62 kB (+265 B (+0.01%))
| File | Base | PR | Diff |
|---|---|---|---|
rrweb.cjs |
550.91 kB | 550.99 kB | +88 B (+0.02%) |
rrweb.js |
550.60 kB | 550.69 kB | +88 B (+0.02%) |
rrweb.umd.cjs |
552.12 kB | 552.21 kB | +88 B (+0.02%) |
rrweb.umd.min.cjs |
259.72 kB | 259.73 kB | +1 B (+0.00%) |
rrweb-player - 1643.75 kB -> 1643.88 kB (+132 B (+0.01%))
| File | Base | PR | Diff |
|---|---|---|---|
rrweb-player.cjs |
473.33 kB | 473.37 kB | +38 B (+0.01%) |
rrweb-player.js |
473.21 kB | 473.24 kB | +38 B (+0.01%) |
rrweb-player.umd.cjs |
476.12 kB | 476.16 kB | +38 B (+0.01%) |
rrweb-player.umd.min.cjs |
221.09 kB | 221.11 kB | +18 B (+0.01%) |
rrweb-snapshot - 609.57 kB -> 609.61 kB (+42 B (+0.01%))
| File | Base | PR | Diff |
|---|---|---|---|
rrweb-snapshot.cjs |
175.01 kB | 175.03 kB | +13 B (+0.01%) |
rrweb-snapshot.js |
174.07 kB | 174.08 kB | +13 B (+0.01%) |
rrweb-snapshot.umd.cjs |
177.48 kB | 177.50 kB | +13 B (+0.01%) |
rrweb-snapshot.umd.min.cjs |
83.00 kB | 83.00 kB | +3 B (+0.00%) |
Juice10
approved these changes
Sep 8, 2026
Merged
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1916.
ignoreAttributecompares the tag name against lowercase['video', 'audio'], but the attribute-mutation handler inpackages/rrweb/src/record/mutation.tspasses the native uppercasetarget.tagName, soautoplaychanges on media elements were never ignored during live recording. This lowercases the tag name insideignoreAttribute, making the snapshot and mutation paths behave the same.Includes unit tests (the uppercase case fails without the fix) and a changeset.