-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow pasting multiple lines into the search field for tokenization (#…
…5806) * Fixes #3712 Allowing Pasting tags from spreadsheet I was trying to make an easy way for clients to copy and paste tags from a spreadsheet, but I was unable to do this because select2's use of a 'search' input would remove all newline characters from the pasted input. replacing the search text input with a textarea removes this limitation. * Fixes bug and broken tests * Missed one spot * Fixes tests posibly? * reformat long lines * Reference options instead of searchElement directly * make input come first in selector * Make textarea the default rather than a configurable * fix weird whitespace * missing a quote * Fix styling to be closer to the default for search boxes This still has an issue with overflows and how the browser will completely shift focus rather than slowly move it character by character, but this is something which we can work out at a later time and shouldn't break things for now. * Fix tests expecting to find an input * Skip autocomplete property tests These tests currently fail in the automated test runner because they are checking the `autocomplete` property on the `<textarea>` DOM element. This attribute is widely supported across our supported browsers, but the property on the JS DOM element has only recently started to be supported. As a result, the virtual browser used by the test runner does not support this property and cannot read it for the tests. * Fix placeholder test returning incorrect width The width was incorrect for the placeholders because it was using the default browser style instead of the ones from Select2. As a result, it was coming back with a width of 104 because it was at 100% of 100px with the default 2px padding all around that is browser by the browser user style sheets. Now that it is being placed inside of the proper container, we can see that the expected styles are being applied. * Introduce new class to better handle the clear button This new class allows us to not have to apply the padding for the clear icon when the clear icon is not being displayed. * Update test with proper width of the search box Co-authored-by: Kevin Brown <kevin-brown@users.noreply.github.com> Co-authored-by: Andrew Colchagoff <andrew@tryskillo.com> Co-authored-by: Kevin Brown <kevin@kevin-brown.com>
- Loading branch information
1 parent
0de98d9
commit 2734538
Showing
7 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters