| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This adds a basic test to make sure that the `autocomplete` attribute on the search box is set based on the value of the `autocomplete` option that is passed in to Select2. This alows people to set the `autocomplete` attribute on their `<select>`, which is valid according to the spec, and have it copy over to the search box of their Select2 instance.
This adds some missing tests for the disabled and multiple attributes and how they can be used to set the corresponding options within Select2. This also adds tests for the new autocomplete option that ensures it is properly synchronized based on the attribute being set.
This will now copy the `autocomplete` attribute (based on the current
state of the `autocomplete` DOM property) from the `<select>` to
any search boxes that are used by Select2. This is necessary to
both handle cases where people do not want the autocomplete
disabled, as well as handling cases where people are looking to set
a custom autocomplete which will assist users when searching.
This still maintains backwards compatibility with the `autocomplete`
option being set to `off` by default. It also allows the
`autocomplete` option to be set through the standard Select2 options
to override the `autocomplete` attribute if it is present.
This does not follow the precedent set by the `disabled` and `multiple`
options where the value is synchronized back to the original
`<select>` when it is overridden by the options. This is because it
would break backwards compatibility because the default state of
the `autocomplete` property is a blank string ('') instead of `off`
which is what Select2 uses.
Not all browsers, including older version of PhantomJS, support the `autocomplete` attribute when it is set on a `<select>` element.
…select2#5839) * Add test to ensure search autocomplete attribute is set This adds a basic test to make sure that the `autocomplete` attribute on the search box is set based on the value of the `autocomplete` option that is passed in to Select2. This alows people to set the `autocomplete` attribute on their `<select>`, which is valid according to the spec, and have it copy over to the search box of their Select2 instance. * Add tests for options set by HTML atttributes This adds some missing tests for the disabled and multiple attributes and how they can be used to set the corresponding options within Select2. This also adds tests for the new autocomplete option that ensures it is properly synchronized based on the attribute being set. * Add support for the autocomplete attribute This will now copy the `autocomplete` attribute (based on the current state of the `autocomplete` DOM property) from the `<select>` to any search boxes that are used by Select2. This is necessary to both handle cases where people do not want the autocomplete disabled, as well as handling cases where people are looking to set a custom autocomplete which will assist users when searching. This still maintains backwards compatibility with the `autocomplete` option being set to `off` by default. It also allows the `autocomplete` option to be set through the standard Select2 options to override the `autocomplete` attribute if it is present. This does not follow the precedent set by the `disabled` and `multiple` options where the value is synchronized back to the original `<select>` when it is overridden by the options. This is because it would break backwards compatibility because the default state of the `autocomplete` property is a blank string ('') instead of `off` which is what Select2 uses. * Skip autocomplete attr test when not supported Not all browsers, including older version of PhantomJS, support the `autocomplete` attribute when it is set on a `<select>` element.
…select2#5839) * Add test to ensure search autocomplete attribute is set This adds a basic test to make sure that the `autocomplete` attribute on the search box is set based on the value of the `autocomplete` option that is passed in to Select2. This alows people to set the `autocomplete` attribute on their `<select>`, which is valid according to the spec, and have it copy over to the search box of their Select2 instance. * Add tests for options set by HTML atttributes This adds some missing tests for the disabled and multiple attributes and how they can be used to set the corresponding options within Select2. This also adds tests for the new autocomplete option that ensures it is properly synchronized based on the attribute being set. * Add support for the autocomplete attribute This will now copy the `autocomplete` attribute (based on the current state of the `autocomplete` DOM property) from the `<select>` to any search boxes that are used by Select2. This is necessary to both handle cases where people do not want the autocomplete disabled, as well as handling cases where people are looking to set a custom autocomplete which will assist users when searching. This still maintains backwards compatibility with the `autocomplete` option being set to `off` by default. It also allows the `autocomplete` option to be set through the standard Select2 options to override the `autocomplete` attribute if it is present. This does not follow the precedent set by the `disabled` and `multiple` options where the value is synchronized back to the original `<select>` when it is overridden by the options. This is because it would break backwards compatibility because the default state of the `autocomplete` property is a blank string ('') instead of `off` which is what Select2 uses. * Skip autocomplete attr test when not supported Not all browsers, including older version of PhantomJS, support the `autocomplete` attribute when it is set on a `<select>` element.
| Back | FazBrowse Home | New Git URL |
This pull request includes a
The following changes were made
If this is related to an existing ticket, include a link to it as well.
Fixes #5628
Closes #5670