react-phone-input-2 icon indicating copy to clipboard operation
react-phone-input-2 copied to clipboard

cannot set required tabindex

Open J-theGit opened this issue 6 years ago • 1 comments

Hi, I cannot set tabindex for this component as it's hardcoded for tabindex=0. Can you please make it possible to set it from props?

J-theGit avatar Feb 20 '20 09:02 J-theGit

@bl00mber Shouldn't the tabindex be set on the input element? Its now being set on the div element.

In my code I had to use javascript to remove the tabindex from the div and add to the input to get the tabs to function correctly.

    const phoneInput = document.getElementsByTagName('input')[0]
    phoneInput.nextSibling.removeAttribute('tabindex')
    phoneInput.setAttribute('tabindex', '1')

naveennazimudeen avatar Mar 21 '20 17:03 naveennazimudeen