You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix edge case when doing el.texture.src = 'some-valid-src' - #619
Fix regression introduced in #616, that manifests in the following case:
Element is already active (visible and within bounds)
We set an invalid src, like el.src = '' or el.src = undefined
Finally we do el.texture.src = 'some-valid-src'
If on step 3 we do el.src = 'some-valid-src' then everything works ok.
If between steps 2 and 3 the element goes inactive and then active, everything also works ok.
We're currently refactoring the Peacock app to always do el.src = '...' instead of el.texture.src = '...' precisely because these setters go through slightly different paths and their behaviours differ.
The reason will be displayed to describe this comment to others. Learn more.
Basically this is the line that always needs to run when the element is enabled, whether the texture is valid or not.
guilhermesimoes
changed the title
Bugfix/invalid then valid tex
Fix edge case when doing `el.texture.src = 'some-valid-src'
Oct 8, 2026
guilhermesimoes
changed the title
Fix edge case when doing `el.texture.src = 'some-valid-src'
Fix edge case when doing el.texture.src = 'some-valid-src'Oct 8, 2026
This does not currently reproduce the reported active-element regression: the first animation frame runs only after the synchronous item.src assignments, and a new element starts outside the bounds margin, so it transitions from inactive to active afterward—the path the PR description says already works. Draw one frame (and assert active) before assigning the invalid source so this test fails against the regressed implementation.
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.
What Enabling Code Scanning Means:
The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.
For more information about GitHub Code Scanning, check out the documentation.
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
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.
Fix regression introduced in #616, that manifests in the following case:
el.src = ''orel.src = undefinedel.texture.src = 'some-valid-src'If on step 3 we do
el.src = 'some-valid-src'then everything works ok.If between steps 2 and 3 the element goes inactive and then active, everything also works ok.
We're currently refactoring the Peacock app to always do
el.src = '...'instead ofel.texture.src = '...'precisely because these setters go through slightly different paths and their behaviours differ.