-
Notifications
You must be signed in to change notification settings - Fork 4.1k
single_backstroke_delete defaults to true #1375
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
Conversation
I think we should consider ripping out the double backstroke supporting code entirely.
Oh yeah 😊 |
@@ -29,7 +29,7 @@ class AbstractChosen | |||
@enable_split_word_search = if @options.enable_split_word_search? then @options.enable_split_word_search else true | |||
@group_search = if @options.group_search? then @options.group_search else true | |||
@search_contains = @options.search_contains || false | |||
@single_backstroke_delete = @options.single_backstroke_delete || false | |||
@single_backstroke_delete = @options.single_backstroke_delete || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code is wrong. false || true
is always true
. See group_search
for the way to configure options defaulting to true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh - good catch. On the other hand, this would be a great way to "remove" the feature without removing it.
`@options.single_backstroke_delete || true` is _always_ true.
@kenearley @stof can I get a final +1? I've added docs and fixed the default problem. |
<td>false</td> | ||
<td>By default, on multiple selects, pressing delete once will highlight the last selection, and pressing again will remove it. Setting this option to <code class="language-javascript">true</code> will remove it on the first press.</td> | ||
<td>true</td> | ||
<td>By default, presseing delete/backspace on multiple selects will remove a selected choice. When <code class="language-javascript">false</code>, pressing delete/backspace will highlight the last choice, and a second press deselects it.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: presseing = pressing
Other than the typo, this looks good. |
single_backstroke_delete defaults to true
- CSS Updates #1368, #1371 - Prevent text selection on Chosen #1374 - single_backstroke_delete defaults to true #1375 - No longer expose classes to window context #1389 - Single select value fix #1392 - Remove javascript:void and attr references #1385, #1377 - Disable Chosen on iPhone / iPod and Android mobile devices by default #1388 - Add Destroy Method #1396 - Option to Hide Selected & Disabled Options #1404 - Always clear result highlight #1407 - Replace characters only once #1411 - Document all the things. #1366, #1376, #1383 - Add Gemfile for compass dependency #1373 - Update copyright and license link #1397 - Add @koenpunt as a maintainer #1399 - Add anchors to documentation headers #1395 - Updated stackoverflow instructions #1403
@kenearley @stof @koenpunt @mlettini @starzonmyarmz
Makes single backstroke deleting the default behavior. Presently, you have to hit backspace twice in Chosen to delete an entry in multiselects. This flips it to mirror the behavior of things like Gmail and Facebook.
I think we should consider ripping out the double backstroke supporting code entirely, but we'll see if anyone complains about this before we take that step.
Closes #639