Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

revert #168, fix #167#190

Merged
dummdidumm merged 5 commits intomainfromrevert-focus-fix
Jan 24, 2023
Merged

revert #168, fix #167#190

dummdidumm merged 5 commits intomainfromrevert-focus-fix
Jan 24, 2023

Conversation

@Rich-Harris
Copy link
Member

#168 introduced a bug with focus management — if you click on a link inside the iframe, it focuses the editor. This reverts that PR andfixes#167 by emitting a message when the iframe receives apointerdown event

tomoam reacted with thumbs up emoji
@vercel
Copy link

vercelbot commentedJan 23, 2023
edited
Loading

The latest updates on your projects. Learn more aboutVercel for Git ↗︎

NameStatusPreviewCommentsUpdated
learn-svelte-dev✅ Ready (Inspect)Visit Preview💬Add your feedbackJan 24, 2023 at 7:41PM (UTC)

Copy link
Member

@dummdidummdummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good, only got one suggestion about code organization 👍

* while the editor is focused. Refocus the editor in these cases.
* This boolean tracks whether or not the editor should be refocused.
*/
exportletpreserve_editor_focus=false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This state is only relevant to the editor, I'd suggest keeping it in there. We already havesvelte:window inEditor.svelte, which we can use to listen to messages as well.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

good catch, updated

@dummdidummdummdidumm merged commit00892b4 intomainJan 24, 2023
@dummdidummdummdidumm deleted the revert-focus-fix branchJanuary 24, 2023 19:47
@tomoam
Copy link
Contributor

tomoam commentedJan 26, 2023
edited
Loading

Thank you, but it appears that the issue similar to#167 has occurred.
I reopen#167. Sorry, I am not capable of reopening the issue.

167.mov

@dummdidumm
Copy link
Member

Thanks for reporting, I pushed a fix that hopefully resolved this

@tomoam
Copy link
Contributor

@dummdidumm
Thank you very much. However, it now appears that another issue has occurred.
When the iframe reloads while I am typing, the text I type is not entered correctly.

lack.mov

I typedexport let data;, but enteredexport let dat;. Thea is missing.
Perhaps text entered during the 100ms (the time of refocusing editor) would be lost.
I'll try to figure out how to fix it too.

@dummdidumm
Copy link
Member

God this iframe stuff is so annoying - thanks for taking another look. Maybe also write down a list of manual tests for future reference so we know that further tweaks don't introduce regressions.

@tomoam
Copy link
Contributor

@dummdidumm
I have created tests with Playwright that cover#150,#167, and this issue (tomoam/learn.svelte.dev:add-test).
Based on this tests, I will create a PR to fix this issue. If you don't need the PR, let me know.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

1 more reviewer

@dummdidummdummdidummdummdidumm approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Cannot focus on input element inside iframe when the editor has focus.

4 participants

@Rich-Harris@tomoam@dummdidumm

[8]ページ先頭

©2009-2025 Movatter.jp