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

T367115: Fix format removal bug #124

Merged
merged 1 commit into from
Jun 11, 2024
Merged

T367115: Fix format removal bug #124

merged 1 commit into from
Jun 11, 2024

Conversation

medied
Copy link
Contributor

@medied medied commented Jun 10, 2024

https://phabricator.wikimedia.org/T367115

While working on #122, I noticed this bug on main when trying to fix the warning associated with the preview format removal feature. This seems to have been introduced in #116, where a change was made to use useRef to keep track of value changes. The fix presented here takes the best of the past solutions:

  • Keep valueRef to keep track of previous value, but simplify as we don't really need lastValue state
  • Favor handleTextFormatRemoval instead of removesPreviewFormat as the former is more robust
  • This PR also actually fixes the warning that came with the previous solution

Please test carefully

@stephanebisson stephanebisson merged commit 54907e9 into main Jun 11, 2024
1 check passed
@stephanebisson stephanebisson deleted the format-removal-bug branch June 11, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants