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
Focus and blur listener is conflict with 'hover' trigger mode #114
Comments
vq0599
changed the title
focus and blur listener is conflict with 'hover' trigger mode
Focus and blur listener is conflict with 'hover' trigger mode
Aug 27, 2019
example works fine https://monosnap.com/file/2tQkh3J0yVEC5JSdayeD8pBO6mBpvS |
unfortunately, I don’t have time to edit the component itself, but the problem can be solved somehow https://jsfiddle.net/3qsac2up/3/ |
Thanks. switch (this.trigger) {
case 'click':
on(this.referenceElm, 'click', this.doToggle);
on(document, 'click', this.handleDocumentClick);
break;
case 'hover':
on(this.referenceElm, 'mouseover', this.onMouseOver);
on(this.popper, 'mouseover', this.onMouseOver);
on(this.referenceElm, 'mouseout', this.onMouseOut);
on(this.popper, 'mouseout', this.onMouseOut);
break;
case 'focus':
on(this.referenceElm, 'focus', this.onMouseOver);
on(this.popper, 'focus', this.onMouseOver);
on(this.referenceElm, 'blur', this.onMouseOut);
on(this.popper, 'blur', this.onMouseOut);
} |
Yes you can do PR |
RobinCK
added a commit
that referenced
this issue
Sep 3, 2019
Fix for #114: Remove focus and blur listener on 'hover' trigger and add 'focus' trigger.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
When using hover mode, If the popper content includes a link
<a href="#">click me</a>
and reference element is focus, the link can't be clicked because the blur event will close the popper firstly.This is a example https://jsfiddle.net/aLuroykm/4/
See #48. Why not add a new trigger mode 'focus' ?
Thanks for your awesome plugin.
The text was updated successfully, but these errors were encountered: