question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This really needs a solution for having scrollIntoView. I can set a ref and try to do it all manually but then i have no way to know when the international dropdown is open or not so I can’t really use that at all.

So I would think taht:

  1. Need either an onClick handler on the international dropdown icon
  2. Need either a automaticallyScrollIntoView prop for the dropdown or need a way to easily get ahold of the dropdown ref so we can call ref.scrollIntoView() on it manually if needed.

Right now the dropdown opens in my window and its cut off and there is no solution other than maybe putting a fixed div on top of it to capture the click event manually which is pretty darn hacky

image

image

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bradennapiercommented, Jul 6, 2017

I added both onDropdown and automaticallyScrollIntoView in https://github.com/halt-hammerzeit/react-phone-number-input/pull/48

I also removed es6 from the gitignore so you are welcome to install it and try it out

yarn add https://github.com/Dash-OS/react-phone-number-input.git
npm install --save https://github.com/Dash-OS/react-phone-number-input.git

0reactions
catamphetaminecommented, Jul 6, 2017

I could just be crazy though 😃

Yeah, because this line was added 3 months before now https://github.com/halt-hammerzeit/react-phone-number-input/blame/master/source/input.js#L791

Anyway, your feedback was positive.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Element.scrollIntoView() - Web APIs | MDN
The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is ...
Read more >
HTML DOM Element scrollIntoView() Method - W3Schools
The scrollIntoView() method scrolls an element into the visible area of the browser window. Syntax. element.scrollIntoView(align). Parameters. Parameter ...
Read more >
JavaScript scrollIntoView() Explained By Examples
In this tutorial, you'll learn how to scroll an element into the view using the JavaScript scrollIntoView() method.
Read more >
scrollIntoView | Can I use... Support tables for HTML5, CSS3, etc
The Element.scrollIntoView() method scrolls the current element into the visible area of the browser window. Parameters can be provided to set the position ......
Read more >
Element.scrollIntoView() - Web APIs
The Element interface's scrollIntoView() method scrolls the element's parent container such that the element on which scrollIntoView() is called is visible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found