microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.81k stars 29.12k forks source link

iPad OS trackpad scroll / mouse wheel support #106232

Open egamma opened 4 years ago

egamma commented 4 years ago

pls see https://github.community/t/ipados-trackpad-doesn-t-scroll/130414

rebornix commented 4 years ago

It's a bug in webkit which doesn't sent out the right events when scrolling on the trackpad https://bugs.webkit.org/show_bug.cgi?id=210071. Currently we couldn't figure out the difference between mouse move and scroll.

VincentDondain commented 4 years ago

@rebornix could you update the issue's title to capture that it's not only impacting trackpad support but also mouse wheel? I do not have the permissions to do that (:

Also, it is my understanding this is the main issue tracking this work (we're also tracking it on the Codespaces side).

rebornix commented 4 years ago

@VincentDondain thanks, I updated the title.

VincentDondain commented 4 years ago

Comment from Apple on 2020-10-21 (hopefully fix soon).

Also, do know that while I can't comment on the timing of fixes, I am absolutely aware of this and know that it is important.

VincentDondain commented 3 years ago

Hey @rebornix, it looks like the WebKit issue is now fixed: https://bugs.webkit.org/show_bug.cgi?id=210071#c34

However, I just tried on iPadOS 14.5 beta 2 and the scrolling on iPad still doesn't work. So either the fix isn't yet in iPadOS or we need some changes in VSCode.

huw commented 3 years ago

As in cdr/code-server#1455, you either need to scroll a little bit to hide the URL bar, or to add your Codespace to your home screen.

isidorn commented 3 years ago

I have commented on the webkit issue so we get clarity on when should this get fixed https://bugs.webkit.org/show_bug.cgi?id=210071

Also the scrolling is butter smooth with the latest update, so that improved. But the external mouse scroll still does not work.

isidorn commented 3 years ago

I have updated to latest iPadOS 14.5 beta 7 and I can verify that the issue is indeed fixed. However there are still two minor issues:

@rebornix might there be some custom editor code that is handling this which we need in more places? Might this code depend on the editor having focus?

Dids commented 3 years ago

@isidorn Curious if you've tried it in Safari with the address bar hidden, or as a PWA (Share -> Add to Home)?

So far this has been the only way I've personally been able to get scrolling working on iPadOS 14.5, even in the list view.

isidorn commented 3 years ago

@dids thanks for tip, yes hiding the address bar would allow to scroll both the list view and the editor. I have updated the webKit issue to reflect this finding.

joaomoreno commented 3 years ago
  • Mouse wheel scroll does not work outside of the editor. For example in the list

In 14.5 it seems to work, but only if the focus is outside the list. 🤷

fuchanglin commented 3 years ago

iPadOS 15 beta 3. Trackpad scroll works only when the address bar is hidden and the screen size >= 3/4 landscape mode, when the split size is half and half or less, even with the hidden address bar the scroll is not working.

maciej commented 3 years ago

Observation: On my 3rd gen 11’ iPad Pro with Magic Keyboard running iPadOS 15 the issue manifests itself only when keyboard “Shortcuts” are disabled. When the setting is enabled I did not see the issue (so far during limited testing).

Setting: Screenshot 2021-09-26 at 03 25 02

vavdoshka commented 3 years ago

Observation: On my 3rd gen 11’ iPad Pro with Magic Keyboard running iPadOS 15 the issue manifests itself only when keyboard “Shortcuts” are disabled. When the setting is enabled I did not see the issue (so far during limited testing).

Setting: Screenshot 2021-09-26 at 03 25 02

same here, 12.9 5th gen, Safari - when "Shortcuts" enabled I have this annoying keyboard "helper" in the bottom of the screen but scroll does work. This helper causes vscode to shrink. When "Shortcuts" disabled the scroll from touch bar / mouse just does not work.

In chrome scroll works with both enabled/disabled "Shortcuts" but there is a huge grey space filler at the bottom causing the vscode to shrink a little, and chrome has relevatively big address/tab bar comparing to safari also which makes the experience slightly worse.

vavdoshka commented 3 years ago

however the scroll does work when when vscode is working as shortcut app (Home Screen). To do so open the vscode in browser -> "add to Home Screen".

Added: But with such setup turned out the copy paste behaves really weird, also code selection in editor does not work at all. The best setup I could achieve so far is to use safari with hidden toolbar for vscode page.

burkeholland commented 2 years ago

IPad 12.9 fifth generation iPadOS 15.1

Scrolling in the file explorer works but only if the focus is not on the sidebar. Scroll has no momentum and stops abruptly when mouse scrolling stops.

Changing the Safari tab layout has no effect and neither does adding the keyboard shortcuts.

taiya commented 2 years ago

Problem persists on iPadOS 15.0.2, e.g. scrolling pubs.json is broken (even when in focus): https://github1s.com/taiya/taiya.github.io/blob/HEAD/pubs.json

I am going to try the PWA solution mentioned above…. update scrolling works in PWA mode (both file editor and explorer views) 🎉 🎉

fuchanglin commented 2 years ago

The scrolling (by Magic keyboard's trackpad) failed in both PWA and normal mode on iPadOS 16 beta 3, make it hard to use now.

lplassman commented 2 years ago

This issue still exists on iPadOS 16 beta 4.

bartlettpsj commented 2 years ago

Interestingly Gitpod works fine.

DAmisonSSG commented 2 years ago

On iOS 16 I have found that if you enable the shortcuts in the keyboard setting it does work

However this gives the white bar at the bottom.

If you go back to the keyboard setting and disable the hortcuts the white bar will go away and scroll will still work

Main downside you have to do this eveytime you open the app

This was accessing vscode in a pwa homescreen shortcut

hzcheng commented 1 year ago

Try this: https://github.com/microsoft/vscode/issues/164220#issuecomment-1407241276

hediet commented 1 year ago

I can verify:

=> This is clearly an upstream issue.

huw commented 1 year ago

This has been completely fixed for me in iPadOS 16.4 Beta 1, including with Shortcuts off and Stage Manager on. I would move to close once 16.4 releases and someone else can verify.

vinerz commented 1 year ago

Just updated to iPadOS 16.4 Beta 3 and I can also confirm that it is working @huw, but now I've got a double cursor (the iPadOS and the VSCode one on top of each other). The scrolling is fully functional in CodeSpaces and code-server, might as well be fixed in VSCode Remote Tunnels.

If I give the editor panel focus by clicking on it, I can only see the VSCode cursor. Once I scroll, the native cursor appears and doesn't go away until it loses focus.

It works nonetheless! Awesome to see it finally working on my iPad after struggling for so long.

hediet commented 1 year ago

I also upgraded my iPad to iPadOS 16.4 Beta 3 and can confirm as well that the trackpad can now be used to scroll lists and text.

but now I've got a double cursor (the iPadOS and the VSCode one on top of each other)

I don't see this though, can you share a screenshot?

vinerz commented 1 year ago

@hediet sure! Here goes a screen capture:

https://user-images.githubusercontent.com/1482034/225091030-352c6b59-94a5-4097-8eaa-e1b4222cd483.mov

hediet commented 1 year ago

Isn't this the expected behavior?

tiagomsmagalhaes commented 1 year ago

I think there's 2 cursors, one in blue (and shorter) the other in white

huw commented 1 year ago

The double cursor problem is much more evident (and worse) when you select text. Not great fun.