The Wayback Machine - https://web.archive.org/web/20211228073730/https://github.com/responsively-org/responsively-app/issues/577
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

Allow users to define cursor mode based on device type #577

Open
geiras opened this issue May 7, 2021 · 5 comments
Open

Allow users to define cursor mode based on device type #577

geiras opened this issue May 7, 2021 · 5 comments

Comments

@geiras
Copy link

@geiras geiras commented May 7, 2021

πŸš€ 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.

@open-collective-bot
Copy link

@open-collective-bot open-collective-bot bot commented May 7, 2021

Hey @geiras πŸ‘‹,

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 add priority label once you become one! πŸ˜„

@jjavierdguezas
Copy link
Contributor

@jjavierdguezas jjavierdguezas commented May 18, 2021

Right now the "Touch mode" is activated at app level:

contents.debugger.sendCommand('Emulation.setEmitTouchEventsForMouse', {
enabled: isTouchMode,
});

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: electron/electron#18438

cc: @manojVivek

@manojVivek
Copy link
Collaborator

@manojVivek manojVivek commented May 19, 2021

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)

@jjavierdguezas
Copy link
Contributor

@jjavierdguezas jjavierdguezas commented May 19, 2021

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

@oluul
Copy link

@oluul oluul commented May 20, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment