Skip to content

Comments

Fix: Font loading/unloading fails in Code Editor#69161

Closed
pranvinit wants to merge 1 commit intoWordPress:trunkfrom
pranvinit:fix/font-loading-in-code-editor
Closed

Fix: Font loading/unloading fails in Code Editor#69161
pranvinit wants to merge 1 commit intoWordPress:trunkfrom
pranvinit:fix/font-loading-in-code-editor

Conversation

@pranvinit
Copy link
Contributor

What?

Why?

  • The font library updates fonts via the fonts property of the root document and iframe document when loading and unloading fonts. However, if the editor mode is switched to the code editor, font updates fail because the iframe document does not exist.

How?

  • Switches to the Visual Mode when the user clicks on the button to open the font library. Since showing the Visual Mode when managing fonts makes more sense from the users POV.

Testing Instructions

  1. Visit the site editor.
  2. Open a template.
  3. Switch to the code editor.
  4. Open the font library.
  5. Attempt to upload a font.

Screenshots or screencast

Screen.Recording.2025-02-12.at.4.35.45.PM.mov

@github-actions
Copy link

github-actions bot commented Feb 12, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: pranvinit <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: Mayank-Tripathi32 <[email protected]>
Co-authored-by: yogeshbhutkar <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Feb 12, 2025
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @pranvinit! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@Mamaduka
Copy link
Member

Mamaduka commented May 1, 2025

Thanks for contributing, @pranvinit!

@t-hamano shared feedback in the issue. Do you have time to continue working on this bug, or should we close this PR?

@Mamaduka Mamaduka added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label May 1, 2025
@Mamaduka
Copy link
Member

Mamaduka commented Aug 4, 2025

Closing this as Stale.

@Mamaduka Mamaduka closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Font Library First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font Library: Font loading/unloading fails in Code Editor

3 participants