-
Notifications
You must be signed in to change notification settings - Fork 178
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
Layers: Prevent crash when undoing layer grouping #13495
Merged
Merged
Conversation
This file contains 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
AnuragVasanwala
added
Type: Bug
Something isn't working
P2
Should do soon
Group: Layers
labels
Nov 15, 2023
swissspidy
changed the title
Fix: Editor crashed when using keyboard shortcut while layers menu is open
Layers: Prevent crash when undoing layer grouping
Nov 15, 2023
…github.com/GoogleForCreators/web-stories-wp into fix/13479-group-layer-editor-crash-on-undo
swissspidy
approved these changes
Nov 15, 2023
Size Change: +19 B (0%) Total Size: 2.77 MB ℹ️ View Unchanged
|
Plugin builds for 53b1b9e are ready 🛎️!
|
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.
Trigger
useStory
to update its state (viauseLayer
) when Group is removed by history action undo/redo.Summary
Performing undo action (last action
Group Layers
) when Layers popup is open doesn't triggeruseStory
to update its state. In this case, group is already removed butuseStory
does not triggered and this causes rendering of a group which is not available.Actually, we are setting group name to empty
''
by default. And when groups is undefined or groupId is undefined, we are passing empty name to the Layer which is different from the actual group name (sayGroup 1
).This is causing
useStory
to update its state in useLayers.jsUser-facing changes
Not applicable.
Testing Instructions
Follow steps provided on issue #13479.
Reviews
Does this PR have a security-related impact?
No.
Does this PR change what data or activity we track or use?
No.
Does this PR have a legal-related impact?
No.
Checklist
Type: XYZ
label to the PRFixes #13479