-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating Autofill_Disable plugin to fix regression. Updated Docs
- Loading branch information
Showing
52 changed files
with
622 additions
and
595 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: auto_position Plugin | ||
description: API Reference for auto_position Plugin | ||
--- | ||
# API Documentation for auto_position Plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: auto_select_on_type Plugin | ||
description: API Reference for auto_select_on_type Plugin | ||
--- | ||
# API Documentation for auto_select_on_type Plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: autofill_disable Plugin | ||
description: API Reference for autofill_disable Plugin | ||
--- | ||
# API Documentation for autofill_disable Plugin | ||
<a name="options"></a> | ||
|
||
## options : <code>object</code> | ||
By default, Selectize allows the browser to autofill the control input provided by the user. | ||
This plugin disables that behavior by generating a random name and autocomplete attribute. | ||
This is a workaround for the fact that browsers do not allow disabling autofill. | ||
|
||
There are several ways to disable autofill, but they all have drawbacks | ||
and are not handled the same way across all browsers: | ||
|
||
- Set the attribute `autocomplete="off"`: This is the most common way to disable autofill, but it is not supported by all browsers. | ||
- Set the attribute `autocomplete="new-password"`: This is the most common way to disable autofill in modern browsers, but it is not supported by all browsers. | ||
- Add a `readonly` attribute to the input and remove the property after the user has interacted with the control. | ||
- Set the input type to `search` or `tel`: in conjuntion with `autocomplete="off"`. | ||
- Wrap the input in a div, and add a hidden input with a tabindex of -1, and styled with 'display: none;'. | ||
- Add a duplicate hidden input with the same name, but a different id. | ||
- Use a randomizes name and autocomplete attribute. | ||
|
||
**Kind**: global typedef | ||
**Author**: [Ris Adams](https://github.com/risadams) | ||
**Example** | ||
```js | ||
$('select').selectize({ | ||
plugins: ['autofill_disable'] | ||
}); | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: defaults | ||
description: API Reference for defaults | ||
--- | ||
# API Documentation for defaults |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: drag_drop Plugin | ||
description: API Reference for drag_drop Plugin | ||
--- | ||
# API Documentation for drag_drop Plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: nanoid | ||
description: API Reference for nanoid | ||
--- | ||
# API Documentation for nanoid | ||
<a name="nanoid"></a> | ||
|
||
## nanoid() | ||
nanoid v3 | MIT license | https://github.com/ai/nanoid | ||
Generates a random ID. We use this to generate unique names for the input fields so that | ||
the browser doesn't try to autofill them. This is a modified version of the original | ||
nanoid function that uses a shorter ID. | ||
|
||
- Modified by Ris Adams <[email protected]> 2023-01-05 (Modified to support Selectize needs) | ||
|
||
**Kind**: global function |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: read-only Plugin | ||
description: API Reference for read-only Plugin | ||
--- | ||
# API Documentation for read-only Plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: select_on_focus Plugin | ||
description: API Reference for select_on_focus Plugin | ||
--- | ||
# API Documentation for select_on_focus Plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: selectize.jquery | ||
description: API Reference for selectize.jquery | ||
--- | ||
# API Documentation for selectize.jquery |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
id: autofill-disable | ||
title: Disable Autofill | ||
description: A plugin to disable the autofill feature of browsers. | ||
--- | ||
|
||
import AutoFillDisable from '@site/src/components/Examples/Plugins/AutoFillDisable'; | ||
|
||
<AutoFillDisable /> |
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
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
Oops, something went wrong.