Commit 350d286
committed
Block editor: Make fit text work with the interactivity API.
Fit text did not work after navigating to a page using the Interactivity API router. When users navigated to a post via client-side navigation (e.g., in a Query block with pagination), fit text blocks would not recalculate their font sizes, appearing either too large or too small.
This occurred because the fit text initialization only ran on the window.load event, which doesn't fire during client-side navigation.
We refactored fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.
This commit adds the required PHP changes.
Props jorgefilipecosta, mukesh27, luisherranz.
Fixes #64210.
git-svn-id: https://develop.svn.wordpress.org/trunk@61145 602fd350-edb4-49c9-b593-d223f7449a821 parent be6a610 commit 350d286
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
| |||
0 commit comments