-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct hidden.bs and shown.bs events firing too early in tooltip and popover #10199
Conversation
… tooltip.js * events fire only after the CSS animation is completed * this fixes also events in popover.js (as it inherits from tooltip.js)
A similar issue seems to be impacting |
@Chaser324 Please file a new separate issue. |
@@ -139,6 +139,7 @@ | |||
this.$element.trigger(e) | |||
|
|||
if (e.isDefaultPrevented()) return | |||
var that = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semicolon 😢
im ok with this… would be rad if you'd add a test though |
I wanted to add some tests, but got blocked on one issue... Other tests are notoriously setting Do you see any other way of doing it other than going through all other tests and making sure that they restore |
can't you just set $.support.transition = true in your test? |
not really - |
ah yeah dur – probably worth looking into that in the future |
All, As this bug has been fixed, how can we set custom position on popover or tooltip like codes http://www.bootply.com/124485. ( it works find at 3.0.3, but not 3.1.0) The problem now is if we change position by css after transition end(as the behavior shown.bs now), user will see the position changing progress on the view, that's not good experience. Thanks for any help |
@crax Use the |
@cvrebert thanks for you reply. template can works with the static content very well, but as dynamic html content in the popover, i think it may need the codes like: $('.popover').css('top',parseInt($('.popover').css('top')) + 22 + 'px') btw, I'm adding a 'showing.bs' between 'shown.bs' and 'show' to temporarily let it work now. |
I notices that tooltip events
shown.bs.tooltip
andhidden.bs.tooltip
fire to early, just aftershow.bs.tooltip
andhide.bs.tooltip
, not waiting for CSS transition to end.Here's a JSBin illustrating the issue: http://jsbin.com/EcaBiSo/2/edit
Popover.js is also affected by this bug as it inherits from tooltip.
This PR corrects this issue.