Skip to content

[examples/iframe] Toolbar buttons do not apply to selected text inside iframe #15

@wudidewo12

Description

@wudidewo12

Description

In the Rendering in iframes example, selecting text inside the iframe editor and then clicking a toolbar button outside the iframe does not apply the formatting change locally. The live reference applies the toolbar action to the selected iframe text.

Recording

Screenshots attached below:

Local actual behavior:

Image

Live reference expected behavior:

Image

Video attached below:

[optional; screenshots should be enough unless the iframe selection and toolbar click sequence is unclear]

Sandbox

No standalone sandbox. Reproduced in the Slate examples site.

Local reproduction URL:

http://localhost:3100/examples/iframe

Reference URL:

https://www.slatejs.org/examples/iframe

Steps

To reproduce the behavior:

  1. Go to http://localhost:3100/examples/iframe.
  2. In the iframe editor, drag-select media queries in the second paragraph.
  3. Click the B toolbar button above the iframe.
  4. Repeat the same steps on https://www.slatejs.org/examples/iframe.

Expectation

The selected media queries text should toggle bold formatting. Since it starts bold, clicking B should remove the bold formatting, matching the live reference.

Actual behavior

On localhost, clicking B does not remove bold formatting from the selected media queries text inside the iframe. The live reference removes the bold formatting from the same selected text.

Environment

  • Local URL: http://localhost:3100/examples/iframe
  • Reference URL: https://www.slatejs.org/examples/iframe
  • Local branch/commit: v2, ce2bd6c6
  • Browser: Chrome
  • OS: macOS
  • Local app setup: Slate examples site served locally with bun serve

Impact

This breaks toolbar formatting for selections rendered inside an iframe. A user can select text in the iframe editor, but toolbar actions from the parent page may not apply to that selection locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions