Notes: Simplify editing mode change position tracking#73696
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: -92 B (0%) Total Size: 2.58 MB
ℹ️ View Unchanged
|
t-hamano
left a comment
There was a problem hiding this comment.
Nice refactoring! Do we like to backport this PR to 6.9.1?
|
Thanks for testing, @t-hamano! Unless it’s needed to fix merge conflicts, let’s avoid backporting code quality refactorings. Minor releases are for bugfixes. |
What?
This is a follow-up to #73046.
PR refactors
useFloatingThreadhook and removes the need for keeping track ofblockMode. This should be a simplified fix for #72836.Why?
Fewer dependencies for effects to worry about is always better.
How?
I basically replaced
useBlockElementRefwithuseBlockElement. The latter reacts to DOM changes and triggers required recalculations.The returned
blockRefvalue from the hook was no longer used, which led me to this refactoring and alternative solution.Testing Instructions
Same as #73046. Confirm that there are no regressions.
Testing Instructions for Keyboard
Same.