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

CTRL + F5 not working while dropdown is open #2321

Open
palikman opened this issue Sep 4, 2019 · 7 comments
Open

CTRL + F5 not working while dropdown is open #2321

palikman opened this issue Sep 4, 2019 · 7 comments

Comments

@palikman
Copy link

palikman commented Sep 4, 2019

Same bug you have on examle page https://developer.snapappointments.com/bootstrap-select/examples/

  • Standard select boxes, click on select in 'Become this:' and try ctrl + f5... not working...
@caseyjhol
Copy link
Member

Released in v1.13.12!

@developstores
Copy link

Don't work on Chrome

@caseyjhol
Copy link
Member

Works on Chrome 83.

@developstores
Copy link

developstores commented Jun 15, 2020

Works on Chrome 83.

Not work on Chrome 83.0.4103.106 for MacOS (cmd + R)
If the dropdown is opened then reloading the page does not work using the keyboard shortcut cmd + R

@gedeminas
Copy link

Same here, MacOS, Chrome 83.0.4103.116, dropdown steals cmd + R shortcut.

@caseyjhol caseyjhol reopened this Jul 9, 2020
@slavanga
Copy link

slavanga commented Oct 5, 2020

The dropdown seems to prevent all cmd related shortcuts.
cmd + L and cmd + A also don't work for example.

@Bl4Cc4t
Copy link

Bl4Cc4t commented Mar 2, 2021

Solved this by listening to the keydown event and blurring the dropdown-toggle (keyCodes from here).

$(document).keydown(e => {
  if ([17, 91, 93, 224].includes(e.keyCode)) {
    let $1 = $("select + .dropdown-toggle:focus")
    if ($1.length) $1.blur()
    let $2 = $("select + button + .dropdown-menu.show")
    if ($2.length) $2.prev().prev().selectpicker("toggle")
  }
})

Made some changes, now it also works when the dropdown is open (was focus only before)

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

6 participants