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

Work Around for countrysearch filled becomes unfocusable until they fix it #157

Open
MahmoudTarekAli opened this issue Jun 27, 2022 · 1 comment

Comments

@MahmoudTarekAli
Copy link

MahmoudTarekAli commented Jun 27, 2022

@HostListener('document:keypress', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {
   const elementExists = document.getElementsByClassName('country-search').length
  if (elementExists) {
    const element = this.renderer?.selectRootElement('.country-search');
    const x = element as HTMLElement;
    setTimeout(() => x.focus(), 200);
  }
}
@icahmed
Copy link

icahmed commented Oct 16, 2022

You can also use jquery
$(document).on('change', '.country-search', function (event) {
event.target.focus();
});

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

2 participants