aboutsummaryrefslogtreecommitdiff
path: root/js/src/modal.js
AgeCommit message (Collapse)AuthorFilesLines
2021-09-07Release v5.1.1 (#34869)v5.1.1XhmikosR1-1/+1
* Prepare v5.1.1. * Dist
2021-08-10Fix modal when is triggered by `bs-toggle`, to hide other open instances ↵GeoSot1-0/+7
(#34701)
2021-08-04Prepare v5.1.0. (#34674)v5.1.0XhmikosR1-1/+1
2021-07-30Enable a few eslint-config-xo rules (#34620)XhmikosR1-1/+1
* unicorn/prefer-dom-node-append * unicorn/prefer-dom-node-remove
2021-07-28Use a streamlined way to trigger component dismiss (#34170)GeoSot1-13/+3
* use a streamlined way to trigger component dismiss * add documentation Co-authored-by: XhmikosR <[email protected]>
2021-07-27Add shift-tab keyboard support for dialogs (modal & Offcanvas components) ↵Ryan Berliner1-25/+11
(#33865) * consolidate dialog focus trap logic * add shift-tab support to focustrap * remove redundant null check of trap element Co-authored-by: GeoSot <[email protected]> * remove area support forom focusableChildren * fix no expectations warning in focustrap tests Co-authored-by: GeoSot <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-07-19modal: change `data-dismiss` so that it can be outside of a modal using ↵GeoSot1-2/+8
`bs-target` (#33403) * change data-dismiss, so can be outside modal, using a bs-target * Update site/content/docs/5.0/components/modal.md Co-authored-by: Gaël Poupard <[email protected]>
2021-06-22Release v5.0.2 (#34276)v5.0.2XhmikosR1-1/+1
* Bump version to v5.0.2. * Dist
2021-06-06Refactor scrollbar.js to be used as a Class (#33947)GeoSot1-4/+5
2021-06-03Add `getOrCreateInstance` method in base-component (#33276)GeoSot1-3/+3
Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2021-06-03Fix handling of transitionend events dispatched by nested elements(#33845)alpadev1-15/+16
Fix handling of transitionend events dispatched by nested elements Properly handle events from nested elements Change `emulateTransitionEnd` to `executeAfterTransition` &&
2021-05-24Fix prevented show event disables modals with fade class from being ↵alpadev1-5/+5
displayed again (#34085) Fix modal, in case is faded, a prevented show event can cause show method to not be executed again.
2021-05-18Reset inside a Dialog does not work if `data-dismiss="modal"` is set (#33928)GeoSot1-1/+1
2021-05-13Release v5.0.1 (#33972)v5.0.1XhmikosR1-1/+1
* Bump version to 5.0.1. * Dist
2021-05-11Extract static `DATA_KEY` & `EVENT_KEY` to base-component (#33635)GeoSot1-3/+3
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
2021-05-11Refactor: move disposing properties into the base class (#33740)GeoSot1-8/+1
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
2021-05-10Merge js-components 'transitionend' listener callbacks into one methodGeoSot1-16/+2
2021-05-05Release v5.0.0 (#33647)v5.0.0XhmikosR1-1/+1
* Bump version to 5.0.0 * Fix npm tag * Dist
2021-04-14Decouple BackDrop from modal (#32439)GeoSot1-62/+22
* Create backdrop.js util * revert breaking changes remove PromiseTimout usage revert class name * one more test | change bundlewatch.config * add config obj to backdrop helper | tests for rootElement | use transitionend helper * Minor tweaks — Renaming Co-authored-by: Rohit Sharma <[email protected]>
2021-04-11Remove element event listeners through base component (#33429)GeoSot1-1/+1
After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`). So, probably is better to utilize the base-component to do the same job.
2021-04-11Decouple Modal's scrollbar functionality (#33245)GeoSot1-71/+11
2021-04-06Omit getting data-attributes from toggle elementGeoSot1-1/+1
2021-04-06Simplify Modal configGeoSot1-26/+11
2021-03-30Use template literals instead of concatenation (#33497)Rohit Sharma1-1/+1
2021-03-23Release v5.0.0-beta3 (#33439)v5.0.0-beta3XhmikosR1-1/+1
2021-03-08modal: move common code to a new `isAnimated` method (#33056)GeoSot1-16/+17
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-2/+2
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-23modal: don't add margin & padding when sticky is not full width (#30621)Muhammadamin1-0/+4
* modal: don't add margin & padding when sticky is not full width * Check if element is shorter than window Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-22Allow constructors to accept a CSS selector (#32245)Rohit Sharma1-1/+1
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-16util: change `isRTL` to a function (#32446)XhmikosR1-4/+3
This allows the bundler to tree-shake the function.
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2021-01-14modal: move common code to reusable functions (#32511)GeoSot1-52/+25
Co-authored-by: XhmikosR <[email protected]>
2021-01-13Fix toggling modal when clicking on `data-bs-toggle="modal"` (#32691)Rohit Sharma1-1/+1
Co-authored-by: XhmikosR <[email protected]>
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-8/+7
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-15/+2
* refactor: use an utility function to define jQuery plugins * test: add spec for defineJQueryPlugin utility function * Update .bundlewatch.config.json Co-authored-by: XhmikosR <[email protected]>
2020-12-07Prepare v5.0.0-beta1.XhmikosR1-1/+1
2020-12-04feat(RTL): implement RTLGaël Poupard1-2/+3
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-7/+2
2020-11-30Remove the `show` property from the modal plugin (#32279)Rohit Sharma1-6/+2
Drop the support of show property from the modal plugin. When creating the new modal instance in v5, the `show` property does not work anymore, so instead of fixing the behavior just removing it permanently to keep the consistency between all the plugins. (All other plugins require the `show()` method to be called on the instances to be shown) Co-authored-by: XhmikosR <[email protected]>
2020-11-29Remove setData from construtors (#32264)Rohit Sharma1-1/+0
2020-11-29Move `VERSION` to BaseComponent (#32254)Rohit Sharma1-5/+0
2020-11-29add dispose in base componentJohann-S1-3/+2
2020-11-29create a base componentJohann-S1-6/+8
2020-11-20Don't hide modal when keyboard is set to false in modal's configuration (#32179)Rohit Sharma1-26/+26
* Don't hide modal when config.keyboard is false * Update unit test - Modal should not be closed when pressing esc key if keyboard = false and backdrop is 'static' Co-authored-by: XhmikosR <[email protected]>
2020-11-20Make the attribute methods bs specific (#32173)Rohit Sharma1-9/+9
Co-authored-by: XhmikosR <[email protected]>
2020-11-14Switch to Number propertiesXhmikosR1-3/+3
2020-11-14Add `bs` in data attributesRohit Sharma1-11/+11
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-2/+2
2020-11-01Streamline jQuery comment. (#32016)XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-11/+14
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>