8000 single_backstroke_delete defaults to true by pfiller · Pull Request #1375 · harvesthq/chosen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 4 commits into from
Jul 19, 2013

Conversation

pfiller
Copy link
Contributor
@pfiller pfiller commented Jul 19, 2013

@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

I think we should consider ripping out the double backstroke
supporting code entirely.
@kenearley
Copy link

@pfiller
Copy link
Contributor Author
pfiller commented Jul 19, 2013

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

@pfiller
Copy link
Contributor Author
pfiller commented Jul 19, 2013

@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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: presseing = pressing

@kenearley
Copy link

Other than the typo, this looks good. :shipit:

pfiller added a commit that referenced this pull request Jul 19, 2013
@pfiller pfiller merged commit fb234e6 into master Jul 19, 2013
@pfiller pfiller deleted the single-backstroke-delete-default branch July 19, 2013 19:48
pfiller added a commit that referenced this pull request Jul 26, 2013
- 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
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

Successfully merging this pull request may close these issues.

Make Single Backstroke Default
3 participants
0