diff options
| author | Johann-S <[email protected]> | 2017-05-24 14:09:36 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2017-05-24 14:57:40 +0200 |
| commit | 4c3b6c5ceb8eda2f0c3f23317d5862248c6d6f9b (patch) | |
| tree | 4371db7741ada3098af2b6e4ce5e20055fbda825 /js | |
| parent | 2c72af88ee177758f67bc7797b95f7dfc95f701b (diff) | |
| download | bootstrap-4c3b6c5ceb8eda2f0c3f23317d5862248c6d6f9b.tar.xz bootstrap-4c3b6c5ceb8eda2f0c3f23317d5862248c6d6f9b.zip | |
Placement auto for popovers
Diffstat (limited to 'js')
| -rw-r--r-- | js/src/popover.js | 2 | ||||
| -rw-r--r-- | js/tests/visual/popover.html | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/js/src/popover.js b/js/src/popover.js index 6c9d78664..a068420d6 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -23,7 +23,7 @@ const Popover = (($) => { const EVENT_KEY = `.${DATA_KEY}` const JQUERY_NO_CONFLICT = $.fn[NAME] const CLASS_PREFIX = 'bs-popover' - const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g') + const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g') const Default = $.extend({}, Tooltip.Default, { placement : 'right', diff --git a/js/tests/visual/popover.html b/js/tests/visual/popover.html index 93fa01f9d..2354abf42 100644 --- a/js/tests/visual/popover.html +++ b/js/tests/visual/popover.html @@ -10,6 +10,10 @@ <div class="container"> <h1>Popover <small>Bootstrap Visual Test</small></h1> + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="auto" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on auto + </button> + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Default placement was on top but not enough place"> Popover on top </button> |
