mirror of
https://github.com/flarum/framework.git
synced 2025-03-02 14:58:57 +08:00
Tweak user card hover trigger
So that it doesn’t appear when hovering over badges
This commit is contained in:
parent
c241d5fd0a
commit
14ef04f45f
@ -44,14 +44,14 @@ export default class PostHeaderUser extends Component {
|
|||||||
|
|
||||||
var component = this;
|
var component = this;
|
||||||
var timeout;
|
var timeout;
|
||||||
this.$().bind('mouseover', '> a, .user-card', function() {
|
this.$().on('mouseover', 'h3 a, .user-card', function() {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(function() {
|
timeout = setTimeout(function() {
|
||||||
component.showCard(true);
|
component.showCard(true);
|
||||||
m.redraw();
|
m.redraw();
|
||||||
setTimeout(() => component.$('.user-card').addClass('in'));
|
setTimeout(() => component.$('.user-card').addClass('in'));
|
||||||
}, 500);
|
}, 500);
|
||||||
}).bind('mouseout', '> a, .user-card', function() {
|
}).on('mouseout', 'h3 a, .user-card', function() {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = setTimeout(function() {
|
timeout = setTimeout(function() {
|
||||||
component.$('.user-card').removeClass('in').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
|
component.$('.user-card').removeClass('in').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user