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

Update _fireOverOutEvents to pass event object #3853

Merged
merged 1 commit into from Apr 20, 2017

Conversation

rhoffmann8
Copy link
Contributor

I encountered a scenario where we were listening for mouseout and calling _isObjectMoved expecting an event object to be passed from the mouseout listener, however the object was not passed from _fireOverOutEvents. Normally this would not be an issue as _isObjectMoved() -> getPointer() checks for fabric.window.event and uses that if event is undefined, but this produces an error in Firefox as the window.event property is not implemented (https://developer.mozilla.org/en-US/docs/Web/API/Window/event).

To resolve this I am proposing that _fireOverOutEvents pass along the event object to the target so that it can be passed along to isObjectMoved() if necessary.

I encountered a scenario where we were listening for `mouseout` and calling `_isObjectMoved` expecting an event object to be passed from the `mouseout` listener, however the object was not passed from `_fireOverOutEvents`. Normally this would not be an issue as `_isObjectMoved()` -> `getPointer()` checks for `fabric.window.event` and uses that if `event` is undefined, but this produces an error in Firefox as the `window.event` property is not implemented (https://developer.mozilla.org/en-US/docs/Web/API/Window/event).

To resolve this I am proposing that `_fireOverOutEvents` pass along the event object to the target so that it can be passed along to `isObjectMoved()` if necessary.
@asturur asturur merged commit 6dd4b70 into fabricjs:master Apr 20, 2017
asturur pushed a commit that referenced this pull request Apr 22, 2017
I encountered a scenario where we were listening for `mouseout` and calling `_isObjectMoved` expecting an event object to be passed from the `mouseout` listener, however the object was not passed from `_fireOverOutEvents`. Normally this would not be an issue as `_isObjectMoved()` -> `getPointer()` checks for `fabric.window.event` and uses that if `event` is undefined, but this produces an error in Firefox as the `window.event` property is not implemented (https://developer.mozilla.org/en-US/docs/Web/API/Window/event).

To resolve this I am proposing that `_fireOverOutEvents` pass along the event object to the target so that it can be passed along to `isObjectMoved()` if necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants