Fix logic bugs related to e1e9427
#1398
Merged
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.
Thanks for submitting code to Blockly! Please fill out the following as part of your pull request so we can review your code more easily.
The basics
The details
Resolves
What Github issue does this resolve (please include link)?
Fixes #1373
Proposed Changes
Describe what this Pull Request does. Include screenshots if applicable.
This PR addresses #1373 by adding an else case in the event filter/merge mechanism to add events that collide with an existing hash but don't have paths for merging with existing events still get added to the event queue.
There is also a minor fix for an issue found with mutators where multiple move events are created and merged such that the resulting events are null, but still end up in the event queue and therefore the undo/redo stack. This causes UX problems because one may have to undo/redo twice.
Reason for Changes
Explain why these changes should be made. Include screenshots if applicable.
This commit is made to address #1373 where events that collided based on the hashing algorithm resulted in events being dropped.
Test Coverage
Please show how you have added tests to cover your changes, or tell us how you tested it and on which platforms. If it's plaform-agnostic you can delete these checkboxes.
Two tests were added to tests/jsunit/event_tests.js to test to ensure that the Scratch
stackclick
event doesn't get dropped following aclick
event and another to test that null events caused by merging are dropped.Tested on:
Desktop:
Smartphone/Tablet/Chromebook (please complete the following information):
Additional Information
Anything else we should know?