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

Randomized id for svg filters #1551

Conversation

howettl
Copy link
Contributor

@howettl howettl commented May 31, 2018

Resolves

Resolves #1549
Resolves #889

Proposed Changes

Randomly generate the id for the stack glow filter and replacement glow filter

Reason for Changes

When inject is called for an embedded workspace (ie. when displaying the custom procedures modal), the stack and replacement glow filters are generated again with the same ID as the original instances. This is an issue in Safari and iOS browsers which then stop displaying the filters when the embedded workspace is destroyed. By randomly generating the filter IDs, we prevent collisions.

Test Coverage

Tested by instantiating an embedded workspace and verifying the fix.

@rachel-fenichel
Copy link
Collaborator

Also resolves #889, probably.

@rachel-fenichel
Copy link
Collaborator

LGTM, Paul should double-check in context of scratch-gui.

@howettl
Copy link
Contributor Author

howettl commented May 31, 2018

You're right, it would resolve #889. I updated the description.

@paulkaplan
Copy link
Contributor

Wonderful! Thanks!

@paulkaplan paulkaplan merged commit f7be0a9 into scratchfoundation:develop May 31, 2018
@howettl howettl deleted the feature/field-highlighting-safari branch May 31, 2018 21:07
@paulkaplan
Copy link
Contributor

As a follow up, it looks like we missed passing the stack glow filter id down into the toolbox/flyout workspace, which caused blocks in the toolbox to disappear when clicked! Fixed now, my bad for missing that fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants