react-intl-tel-input icon indicating copy to clipboard operation
react-intl-tel-input copied to clipboard

Dropdown arrow won't open dropdown

Open HamAndRock opened this issue 4 years ago • 4 comments
trafficstars

Clicking on down arrow, won't open the dropdown.

Expected Behavior

When i click right on the arrow symbol the dropdown should open.

Current Behavior

The dropdown won't open

Steps to Reproduce

  1. Click right in middle of dropdown arrow

Environment

  • Version: v8.0.4
  • Browser: Chrome,

HamAndRock avatar Jan 25 '21 12:01 HamAndRock

This issue is accrues because of class in dropdown arrow element, class in country code element (if separateDialCode is true), if you remove the class from that particular element then it will work perfectly fine.

To solve Arrow Dropdown Click:- In your CSS file add below CSS to solve issue.

.intl-tel-input.allow-dropdown .arrow { display: none; } .intl-tel-input.allow-dropdown .selected-flag:after { content: "\25BC"; font-size: 6px; margin-left: 5px; } .intl-tel-input.allow-dropdown.expanded .selected-flag:after {
content: '\25B2'; }

To Solve Country Code Click:- After intl-tel-input initialize add below code.

setTimeout(() => { document.querySelector('.intl-tel-input .selected-dial-code').classList.remove("selected-dial-code") }, 50);

*If you want to add css for Country Code then you can do like this. .intl-tel-input.allow-dropdown .selected-flag { Your: CSS, }

before after

gotitthanks avatar Feb 01 '21 10:02 gotitthanks

Yeah unfortunately I don't use separateDialCode={true}, so i dont hate that class there. Just the blue section causing the problem margin section registers the click ok.

image

HamAndRock avatar Feb 01 '21 15:02 HamAndRock

To solve this issue, just add this CSS to you global CSS file.

Chcete-li tento problém vyřešit, přidejte do svého globálního souboru CSS níže uvedený kód CSS.

.intl-tel-input.allow-dropdown .arrow { display: none; } .intl-tel-input.allow-dropdown .selected-flag:after { content: "\25BC"; font-size: 6px; margin-left: 5px; } .intl-tel-input.allow-dropdown.expanded .selected-flag:after { content: '\25B2'; }

gotitthanks avatar Feb 01 '21 15:02 gotitthanks

Just add a global css rule to disable click listeners on arrow class

.arrow { pointer-events: none; }

justgeek avatar Aug 20 '21 22:08 justgeek