responsively-app
responsively-app copied to clipboard
Allow users to define cursor mode based on device type
🚀 Feature Request
📝 Description
When debugging mobile views, it's important to understand the cursor target size and simulate, as much as possible, the native behaviour of touchscreens.
✨ Describe the solution you'd like
I believe that it makes sense to emulate as much as possible the real behaviour of pointing devices. My suggestion is to allow the user to define what is the preferred cursor mode for any device. This way, I could say my mobile view has Touch Mode enabled by default and desktop would have the usual cursor.
✍️ Describe alternatives you've considered
Changing input modes when debugging mobile and desktop at the same time is time consuming but that's the only alternative I've seen so far.
Hey @geiras :wave:,
Thank you for opening an issue. We will get back to you as soon as we can. Have you seen our Open Collective page? Please consider contributing financially to our project. This will help us involve more contributors and get to issues like yours faster.
https://opencollective.com/responsively
We offer
priority
support for all financial contributors. Don't forget to addpriority
label once you become one! :smile:
Right now the "Touch mode" is activated at app level:
https://github.com/responsively-org/responsively-app/blob/c5e74180108796760fcfa3f98b001083e8c49f7a/desktop-app/app/components/ToggleTouch/index.js#L43-L45
we can do exactly the same per device (per <webview/>
)
On WebView component:
this.getWebContents().debugger.sendCommand('Emulation.setEmitTouchEventsForMouse', {
enabled: isTouchMode,
configuration: "mobile" // (or "desktop")
});
more info: https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setEmitTouchEventsForMouse
⚠ check this issue: https://github.com/electron/electron/issues/18438
cc: @manojVivek
we can do exactly the same per device (per
<webview/>
)
@jjavierdguezas We have tried this but it didn't work as expected. It still enabled touch mode for the whole app.
Ref: https://github.com/responsively-org/responsively-app/issues/31#issuecomment-642577602
we can do exactly the same per device (per
<webview/>
)@jjavierdguezas We have tried this but it didn't work as expected. It still enabled touch mode for the whole app.
Ref: #31 (comment)
yeah that's the electron issue I linked too
you can try https://www.npmjs.com/package/iohook
can i work on this issue ?? i am interested in doing so?
Hey @sakshamp11, that's great, please take it up. 👍🏼
i like so mach more
Hey @Hooman-Asbaghi can I work on this issue?
Hi @sakshamp11 are you still working on this?
Duplicate of #
@jjavierdguezas hi bro
Wouldn't it be better for you to leave it out. Because in that case you can make it more objective, don't you think? @geiras