diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-05-24 15:09:36 +0300 |
---|---|---|
committer | Johann-S <johann.servoire@gmail.com> | 2017-05-24 15:57:40 +0300 |
commit | 4c3b6c5ceb8eda2f0c3f23317d5862248c6d6f9b (patch) | |
tree | 4371db7741ada3098af2b6e4ce5e20055fbda825 /js | |
parent | 2c72af88ee177758f67bc7797b95f7dfc95f701b (diff) |
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 6c9d786647..a068420d63 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 93fa01f9da..2354abf425 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> |