aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tooltip.js')
-rw-r--r--js/src/tooltip.js12
1 files changed, 12 insertions, 0 deletions
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