aboutsummaryrefslogtreecommitdiff
path: root/js/src/button.js
AgeCommit message (Collapse)AuthorFilesLines
2019-11-28Release v4.4.1.v4.4.1XhmikosR1-2/+2
2019-11-26Release v4.4.0 (#29735)v4.4.0XhmikosR1-2/+2
2019-07-10Ensure button plugin sets/removes active class correctly on page load (#28952)Patrick H. Lauke1-7/+37
* Ensure correct active class is set on button toggles/checkboxes/radios on page load Sanity check, ensures that the UI visually matches the actual values/states of controls. Also ensures that if any autocomplete/autofill happened, this is visually accounted for by having the correct class set. Includes unit tests (and `autocomplete` has been removed from these as it's no longer necessary) * Remove now unnecessary autocomplete attribute As the attribute was there to force/ensure that the visual presentation matched the state, and this is now taken care of programmatically, there's no need to unnecessarily suppress autocomplete...let them autocomplete if they want to...
2019-06-18Fix keyboard handling of button-style checkbox/radio button groups (#28834)Patrick H. Lauke1-16/+28
- adds more defensive checks to make sure no unnecessary toggling happens on disabled buttons; this also fixes an up-to-now undiscovered bug where a toggle button with `.disabled` class would still have its `aria-pressed` toggled - adds a set of explicit tests for the above case of disabled buttons and `aria-pressed` - remove a now irrelevant (or at least very nonsensical) test for `<label>` containing both an actionable and a `hidden` `<input>` - expand the test for disabled checkbox to also explicitly test starting conditions (used mainly in my debugging) - ensure that `$btn[0].click()` is used to click checkboxes in tests, rather than the `click()` on the jquery object which is simply a shorthand for `trigger('click')` and does not actually trigger the browser default behavior - remove the `preventDefault()` from the button handling, which was preventing correct keyboard functionality for checkboxes/radio buttons - add extra logic to the button.js code to handle checkboxes correctly and avoid double-triggering as a result of mouse interactions (which saw the checkboxes being toggled twice, thus returning them to their original state) - add logic that prevents the `checked` property from being added incorrectly for any inputs other than radio buttons and checkboxes - added more tests (including the most basic test for a properly triggered fake checkbox button) - work around Firefox bug #1540995 (which this code was hitting after removing the `preventDefault()`, due to Firefox's incorrect toggling of disabled checkboxes when programmatically (but not manually) activated with a `click()` event
2019-02-13Release v4.3.1. (#28252)v4.3.1XhmikosR1-2/+2
2019-02-11Release v4.3.0 (#28228)v4.3.0Mark Otto1-2/+2
* Prep for v4.3.0 * More updates for v4.3.0. * rerun to build docs source map
2018-12-21Bump to v4.2.1 (#27892)v4.2.1Mark Otto1-2/+2
2018-12-21Prep for v4.2.0 releaseMark Otto1-2/+2
- Move 4.1 docs to 4.2 - Update versions everywhere to 4.1.3 with release script - Manually bump the shorthand version in package.json - Add 4.2 to the versions docs page - Update some redirects - Fix tests asset URLs - Bump Nuget and more
2018-12-10Change button checkbox/radios to ignore hidden input fields (#27802)Mike Vastola1-1/+1
2018-11-14some cleaning and changes for readabilityJohann-S1-2/+2
2018-09-26remove useless iifeJohann-S1-132/+128
2018-08-12Use ES6 arrow function.XhmikosR1-1/+1
2018-07-24Ship v4.1.3v4.1.3Mark Otto1-2/+2
2018-07-12Ship v4.1.2Mark Otto1-2/+2
2018-06-03refactor(plugins): query elements without jqueryJohann-S1-5/+5
2018-04-30Bump version to v4.1.1v4.1.1Mark Otto1-2/+2
2018-04-09Ship v4.1.0 (#26218)v4.1.0Mark Otto1-2/+2
* update docs path from docs/4.0/ to docs/4.1/ * bump version to 4.1.0 * Update redirects to work for 4.1 docs move * Update docs version switcher to include latest and link to 4.0 docs * re-run dist * Update package-lock.json * Update docs-navbar.html
2018-01-18Bump version to 4.0.0Mark Otto1-2/+2
2018-01-11Comply to the new rules.XhmikosR1-21/+8
2017-12-28Update version to 4.0.0-beta.3v4.0.0-beta.3Mark Otto1-2/+2
2017-10-24Change Rollup config to wrap our dist files with jQuery instead of $Johann-S1-3/+2
2017-10-23Add `Util.jQuery` which will detect jQuery instead of relying on global `$` ↵Johann-S1-1/+3
(#24513)
2017-10-19fix version numberMark Otto1-2/+2
2017-10-19new version numberMark Otto1-2/+2
2017-10-04Use imported jQuery objectJohann-S1-1/+1
2017-08-31Create a bundled release of Bootstrap with Popper.js insideJohann-S1-1/+2
2017-08-10bump to betav4.0.0-betaMark Otto1-2/+2
2017-04-26Fix Toggle buttons don't honor [disabled] or .disabledAnna1-0/+6
2017-04-10Only change aria-pressed if it's not an input-based radio or checkbox groupPatrick H. Lauke1-2/+6
* Only change aria-pressed if it's not an input-based radio or checkbox group aria-pressed="true"/aria-pressed="false" is really only useful for making on/off toggles out of, say, `<button>` elements. the attribute is useless (and potentially confusing/conflicting) on, say, `<label>` elements for an existing `<input type="radio">` or similar. * Add unit test for buttons.js and radio/checkbox inputs in button groups
2017-01-06version bumpMark Otto1-2/+2
2017-01-04Close #21090 - Fix aria-pressed attribute for buttons in container with ↵Johann-S1-3/+3
data-toggle='buttons'
2016-11-26Merge pull request #18900 from vlastikcz/v4-dev-buttonChangeMark Otto1-1/+1
Button toggling - trigger change event on input. Fixes #16673, fixes #17599.
2016-11-24Make JS compliant with the new ESLint rules.Bardi Harborow1-4/+4
2016-10-19version bump to alpha 5Mark Otto1-2/+2
2016-09-05versionsMark Otto1-2/+2
2016-07-27bump versionsMark Otto1-2/+2
2016-02-17Replace jQuery with vanilla JSPatrick H. Lauke1-1/+1
2016-02-16Focus (visually hidden) input radio/checkboxPatrick H. Lauke1-0/+3
This allows for keyboard navigation (e.g. arrow keys left/right to trigger different radio buttons) following an initial mouse click interaction
2016-01-14Button toggling - trigger change event on inputKotas Vlastimil1-1/+1
Bootstrap’s .button styles can be applied to other elements, such as labels, to provide checkbox or radio style button toggling. When the checkbox or radio state is changed, there should be triggered the change event. Currently, the change event is triggered on the Button, which is not correct. Only input fields do support the change event.
2015-12-08Update version numbers using npm scriptChris Rebert1-1/+1
Errata from: * 8ce5da30260c1368ae97838fcf010375071a7243 * 5d3144e8fb5c7202991b7614d77dfc00903fcb2e which missed a few numbers. [skip sauce] [skip validator]
2015-12-08manually bump versions because npm script wasn't working for meMark Otto1-1/+1
2015-12-05Fix version numbers is JS files; fixes #18435Chris Rebert1-2/+2
[skip sauce] [skip validator]
2015-08-18js tests passing + eslintJacob Thornton1-5/+4
2015-05-13implement global dispose methodfat1-4/+12
2015-05-10add getters for Version and Default where applicablefat1-0/+8
add modal my gawd
2015-05-07carousel -> es6fat1-9/+9
2015-05-07button -> es6fat1-0/+158