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

Dropdown arrow won't open dropdown #365

Open
HamAndRock opened this issue Jan 25, 2021 · 4 comments
Open

Dropdown arrow won't open dropdown #365

HamAndRock opened this issue Jan 25, 2021 · 4 comments

Comments

@HamAndRock
Copy link

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,
@NehalJadav
Copy link

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

@HamAndRock
Copy link
Author

HamAndRock commented Feb 1, 2021

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

@NehalJadav
Copy link

NehalJadav commented Feb 1, 2021

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';
}

@justgeek
Copy link

justgeek commented Aug 20, 2021

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

.arrow { pointer-events: none; }

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

No branches or pull requests

3 participants