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

Better Support for Hybrid Devices #20

Open
ollex opened this issue Dec 11, 2018 · 8 comments
Open

Better Support for Hybrid Devices #20

ollex opened this issue Dec 11, 2018 · 8 comments

Comments

@ollex
Copy link

ollex commented Dec 11, 2018

Hi, when I simply try the demo link https://codepen.io/Mobius1/pen/OOXPwo in Chrome it's working great, in Firefox I can't select via the drag & drop (rectangle) option. It does not seem to work in FF at the moment? I have both the latest versions of these browsers installed. Edge for example works, too without any problems.

@Mobius1
Copy link
Owner

Mobius1 commented Dec 11, 2018

It's working for me in FF 52.0, 62.0.3 and 63.0.3, but the unpkg MDN has been timing-out for the past day or so. It may be that. Any errors in the console?

@ollex
Copy link
Author

ollex commented Dec 11, 2018

ah that'd be great, I noticed slow loading times on a site I'm using it via the unpgk cdn so maybe it's just that but I didn't get any error messages in the console which is weird. I'll try to find out what it could be seems related to my FF installation then!

@ollex
Copy link
Author

ollex commented Dec 11, 2018

Hm it is very weird. On 63.03 I was just until a few secs ago, selectablejs doesn't work with it nor do I see any errors. I updated to 64.0 and the same. The script is defo loaded I can even throw it into the same page above any js and the rectangular selection is not working, only in my FF (it remains not working on your demo with 64.0 in FF). It works in any other browser I throw at it (don't have IE installed though so Chrome and Edge are working just fine and I love your lib).

@ollex
Copy link
Author

ollex commented Dec 11, 2018

ah .. I just figured something out: It has got to do with touch settings: I can select rectangular on FF with "touch" gestures, but I can't using the mouse. So it seems related to how the browsers are interpreting something in this respect. Chrome let's me do it with the mouse only when I navigate to your codepen, FF doesn't let me do it with the mouse. It right away only gives me the touch option. Do you have any idea what the cause of this different behaviour would be and is there a way touch can be disabled?

@ollex
Copy link
Author

ollex commented Dec 11, 2018

OK - that's it: dom.w3c_touch_events.enabled in about:config set to 0 and I can select with the mouse in FF as in the other browsers. Good to know ... !

@ollex ollex closed this as completed Dec 11, 2018
@Mobius1
Copy link
Owner

Mobius1 commented Dec 11, 2018

Just out of curiosity, are you using a hybrid laptop that allows both mouse and touch controls? I coded selectablejs to remove the mousedown event listener on these type of devices to prevent conflicts with the touch controls. I may need to add an option to force enable / disable mouse and touch controls to get around these problems.

@ollex
Copy link
Author

ollex commented Dec 11, 2018

Yes, that's the case - I am on a hybrid, that probably makes it complicated! I personally am happy for my use cases if it's mouse only no touch. So if there is an easy way to enable/disable mouse or touch that is probably a great addition to make it work anywhere anyhow people might want it

@Mobius1
Copy link
Owner

Mobius1 commented Dec 11, 2018

I'm gonna reopen this issue just in case anyone else comes here with the same problem. I'll modify the code to include better support for hybrid devices.

@Mobius1 Mobius1 reopened this Dec 11, 2018
@Mobius1 Mobius1 changed the title Firefox not working Better Support for Hybrid Devices Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants