Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom focus implementation #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheRusskiy
Copy link

Addresses #13

Example usage:

const focus = (input) => {
  input.focus({ preventScroll: true })
  if (input.scrollIntoView) {
    input.scrollIntoView({
      behavior: 'smooth',
      block: 'center',
    })  
  }
}
createDecorator(undefined, undefined, focus)

@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #25 (48f7dfb) into master (c26b46e) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #25   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines           44        48    +4     
  Branches        11        12    +1     
=========================================
+ Hits            44        48    +4     
Impacted Files Coverage Δ
src/decorator.js 100.00% <100.00%> (ø)
src/focusInput.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c26b46e...48f7dfb. Read the comment docs.

@ricmello
Copy link

ricmello commented Oct 4, 2022

Hey guys! Any chances of getting this PR merged?

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

Successfully merging this pull request may close these issues.

2 participants