diff options
Diffstat (limited to 'js/src')
| -rw-r--r-- | js/src/dropdown.js | 4 | ||||
| -rw-r--r-- | js/src/tooltip.js | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/js/src/dropdown.js b/js/src/dropdown.js index d678a3a02..613a23812 100644 --- a/js/src/dropdown.js +++ b/js/src/dropdown.js @@ -65,8 +65,8 @@ const Dropdown = (($) => { } const AttachmentMap = { - TOP : 'top', - BOTTOM : 'bottom' + TOP : 'top-start', + BOTTOM : 'bottom-start' } const Default = { diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 2c34ac5d7..b446d9bcc 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -287,6 +287,12 @@ const Tooltip = (($) => { offset : { offset : this.config.offset } + }, + onCreate : (data) => { + this._handlePopperPlacementChange(data) + }, + onUpdate : (data) => { + this._handlePopperPlacementChange(data) } }) @@ -637,6 +643,12 @@ const Tooltip = (($) => { } } + _handlePopperPlacementChange(data) { + if (data.originalPlacement !== data.placement) { + this._cleanTipClass() + this.addAttachmentClass(this._getAttachment(data.placement)) + } + } // static |
