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

add shortcut for deselect #2715

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion coffee/lib/abstract-chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ class AbstractChosen
evt.preventDefault()
this.keydown_arrow()
break
when 46 # delete
if @allow_single_deselect and not @results_showing
evt.preventDefault()
this.results_reset()
break

keyup_checker: (evt) ->
stroke = evt.which ? evt.keyCode
Expand All @@ -290,7 +295,7 @@ class AbstractChosen
when 27 # escape
this.results_hide() if @results_showing
break
when 9, 16, 17, 18, 38, 40, 91
when 9, 16, 17, 18, 38, 40, 46, 91
# don't do anything on these keys
else
this.results_search()
Expand Down