Skip to content
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

onMouseOut doesn't fire #78

Open
slorber opened this issue Jun 10, 2016 · 3 comments
Open

onMouseOut doesn't fire #78

slorber opened this issue Jun 10, 2016 · 3 comments
Labels

Comments

@slorber
Copy link
Contributor

slorber commented Jun 10, 2016

source:

    onMouseOut: function (event) {
        if (window._blockMouseEvents || !this._mouseDown) return;
        this.processEvent(event);
        this.props.onMouseOut && this.props.onMouseOut(event);
        this.endMouseEvent();
    },

If I have <Tappable otherThings... onMouseOut={callback}/>, the callback will never be fired on mouse out, because !this._mouseDown is false. I think this is unexpected no?

@aarosil
Copy link

aarosil commented Jun 15, 2016

I'm also interested in the reason for this. Would be happy to work on a PR to fix if I understand the cases.

@MilllerTime
Copy link

MilllerTime commented Aug 12, 2016

Can confirm this is an issue. I was able to work around it by adding the onMouseOut event to a child component of Tappable but that isn't a nice solution, and straight up won't work for a lot of use cases.

onMouseOut should fire whether the mouse is currently down or not. Is there a technical reason for the !this._mouseDown check?

Today's state of devices means that touch/mouse support is needed in unison, making this a pretty important issue imo.

@dcousens dcousens added the bug label May 8, 2017
@dcousens
Copy link
Collaborator

dcousens commented May 8, 2017

PRs welcome, but please add an example with instructions for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants