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.

regain focus when it gets lost by mistake#161

Merged
dummdidumm merged 3 commits intomainfromgh-150
Dec 16, 2022
Merged

regain focus when it gets lost by mistake#161

dummdidumm merged 3 commits intomainfromgh-150
Dec 16, 2022

Conversation

@Rich-Harris
Copy link
Member

@Rich-HarrisRich-Harris commentedDec 16, 2022
edited
Loading

closes#150.

There are basically three ways that the editor could lose focus:

  1. the user clicked on the page outside the editor
  2. the user tabbed after hitting theCtrl-M orCtrl-Shift-M (on Mac) combo (which temporarily disables focus trapping, I learned today)
  3. the iframe captures it

All we need to do, therefore, is determine whether afocusout event was caused by 1 or 2, and if not, recapture the focus. It seems to work reliably for me

@vercel
Copy link

vercelbot commentedDec 16, 2022
edited
Loading

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

NameStatusPreviewUpdated
learn-svelte-dev✅ Ready (Inspect)Visit PreviewDec 16, 2022 at 5:00PM (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.

(leaving a comment above the boolean so future selves know what the fuck is going on)

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.

Text input focus sometimes lost on rerender/error

3 participants

@Rich-Harris@dummdidumm

[8]ページ先頭

©2009-2025 Movatter.jp