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

mouse:up event in Safari? #26

Open
lucidchin opened this issue Aug 23, 2017 · 4 comments
Open

mouse:up event in Safari? #26

lucidchin opened this issue Aug 23, 2017 · 4 comments

Comments

@lucidchin
Copy link

I'm seeing something odd. It looks like in Safari, the mouse:up event for the fabric overlay doesn't get triggered. Anyone else run into Safari issues?

@altert
Copy link
Owner

altert commented Aug 23, 2017

does it happen on current demo? http://altert.github.io/OpenseadragonFabricjsOverlay/demo.html

@lucidchin
Copy link
Author

Hmm, should I be using the fabric.adapted.js in the demo? In my project I'm using fabric-1.7.7.js.
I modified the openseadragon-fabricjs-overlay.js file and just added the following code:

this._fabricCanvas.on('mouse:up',function(options) {
     console.log("Mouse Up");
});

But the Mouse Up message never appears in the debug console. I put a similar console.log in the mouse:down and that appears in the console.

@altert
Copy link
Owner

altert commented Aug 23, 2017

yes, see #21
My guess it's similar. Demo works fine for me in safari

@lucidchin
Copy link
Author

lucidchin commented Aug 23, 2017

Thanks for the info. I finally got things working by using the updated files from the demo. But something I noticed is the mouse:up event doesn't fire unless the openseadragon viewer has the mouseNavEnabled set to false. The mouse:down and mouse:move are still triggered though.
I also didn't realize that I had to have the e.preventDefault in the mouse:down, without that the mouse:up also didn't trigger.

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

No branches or pull requests

2 participants