Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Reset focus to document on navigation #287

Closed
Rich-Harris opened this issue Jun 18, 2018 · 2 comments
Closed

Reset focus to document on navigation #287

Rich-Harris opened this issue Jun 18, 2018 · 2 comments

Comments

@Rich-Harris
Copy link
Member

This is needed for a11y

@carcinocron
Copy link

carcinocron commented Nov 10, 2019

Can we disable this or have it only occur when the $page.path changes? It's breaking my input fields when an input field syncs to to $page.query.

@thgh
Copy link
Contributor

thgh commented Nov 10, 2019

Possible workaround:

<input bind:this={input} />

<script>
let input
$: noBlur(input)
function noBlur(input) {
  input.originalBlur = input.blur
  input.blur = () => {}
}
</script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants