Update tooltip.js positionTooltip #65

Merged
Drumstix42 merged 1 commits from Auto-position-class-fix into master 2020-11-19 06:59:11 +08:00
Drumstix42 commented 2020-11-18 22:23:51 +08:00 (Migrated from github.com)

Description
This is a "simple" fix to address an issue I noticed with tooltip/popover positioning for "auto" placement. This also fixes the arrow to show up on the correct side, as it's based on the class applied to the popover for example.

Not sure if there is a cleaner way to do this, but this seems to work well.

Changes

  • update positionTooltip fn to apply the proper class to tooltips/popovers when using "auto" placement determination
  • now if a popover with "auto right" ends up being calculated to the left, the popover will receive the correct left class, and not right.
**Description** This is a "simple" fix to address an issue I noticed with tooltip/popover positioning for "auto" placement. This also fixes the arrow to show up on the correct side, as it's based on the class applied to the popover for example. Not sure if there is a cleaner way to do this, but this seems to work well. **Changes** - update `positionTooltip` fn to apply the proper class to tooltips/popovers when using "auto" placement determination - now if a popover with "auto right" ends up being calculated to the left, the popover will receive the correct `left` class, and not `right`.
Morgul (Migrated from github.com) approved these changes 2020-11-19 06:59:06 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: invisi/ui-bootstrap4#65