#64210 closed defect (bug) (fixed)
Block editor: Make fit text work with the interativity API
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Editor | Keywords: | gutenberg-merge has-patch |
| Focuses: | Cc: |
Description
Track backports: WordPress/gutenberg#72923
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.
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 ticket tracks the required PHP changes.
Change History (3)
This ticket was mentioned in PR #10455 on WordPress/wordpress-develop by @jorgefilipecosta.
5 weeks ago
#1
- Keywords has-patch added
Backports: https://github.com/WordPress/gutenberg/pull/72923
Backports the required core changes to make fit text work correctly 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.
This PR refactors fit text front end to be an interactivity api first implementation, using an interactivity api init event instead of a window load event.