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

Simultaneous html5 and touch backend #3483

Open
Julusian opened this issue Aug 6, 2022 · 3 comments
Open

Simultaneous html5 and touch backend #3483

Julusian opened this issue Aug 6, 2022 · 3 comments

Comments

@Julusian
Copy link

Julusian commented Aug 6, 2022

Is your feature request related to a problem? Please describe.
I have a touchscreen laptop. Most of the time, I will use the trackpad or mouse but sometimes it can be a lot easier to use the touchscreen.

I have a application using react-dnd with the html-backend. This works great when using the trackpad/mouse, but doesnt let me use the touchscreen when I feel it would be easier.
I could use the touch-backend, but as that has 'buggy' support for mouse events (with no explanation as to what about it is buggy), that doesnt sound like a good idea.

Describe the solution you'd like
A way to be able to use touch and mouse events without changing the backend.
Ideally I think this should be part of the html5-backend (with an opt-out option), as in most cases touch and mouse will want to be handled identically.

Describe alternatives you've considered

I tried setting up both backends, but as expected only one of them functioned at a time.

There is a 3rd party backend https://github.com/LouisBrunner/dnd-multi-backend, but as its last stable release was 2 years ago, and last commit was a year ago it doesn't seem sensible to be reliant on that.

Should I try to swap out the active backend depending on whether the user is currently providing touch or mouse events? That feels like a terrible idea that will probably not work.

Additional context
I admit that touchscreens on laptops are a bit unusual, but they are very easy to find.
Pretty much every customisable laptop from Dell or lenovo (havent checked elsewhere) can have a touchscreen added for cheap. And the microsoft surface is whole range that is primarily in tablet form.

This doesn't sound like a problem that is unique to my application. But it is the kind of thing that you don't think about until a user asks about it.

@altarrok
Copy link

An official multi-backend solution would be great IMO

@MPiland
Copy link

MPiland commented Dec 14, 2023

I know this is old but I came across this looking for this same solution. Turns out, the multi package has a Sept. 6 release of this year so it seems to be updated somewhat. Not sure how well it works, I'm going to try it out myself.

@jinjilynn
Copy link

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

4 participants