Skip to content

Can’t scroll on iPad with a trackpad. #1455

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

Closed
awahlig opened this issue Mar 25, 2020 · 61 comments
Closed

Can’t scroll on iPad with a trackpad. #1455

awahlig opened this issue Mar 25, 2020 · 61 comments
Assignees
Labels
blocked This issue cannot proceed due to external factors browser-safari Safari related
Milestone

Comments

@awahlig
Copy link

awahlig commented Mar 25, 2020

On an iPad running iPadOS 13.4 (which added full trackpad/mouse support), two-finger-scrolling on a trackpad doesn’t work (nothing happens).

Tested in different panels (editor, terminal, settings).
Tested using Magic Trackpad 2 (Apple’s iPad Pro keyboard with trackpad is not yet available).
Tried both the :latest (About window shows 1.41.1) and :3.0.1 docker images.

@dvelopin
Copy link

Magic Mouse also doesn't "scroll" it seems to simulate "up" and "down" from the keyboard instead. There may be behavior settings we need to adjust?

@mjsamberg
Copy link

Also, the scroll wheel on a mouse scrolls the entire window instead of just the text editor area.

@claytonwinders
Copy link

claytonwinders commented Mar 28, 2020

On a Logitech MX Vertical, binding Scroll Up and Scroll Down in Assistive Touch settings to the forward and back buttons allows for scrolling in the terminal/code windows separately. I haven’t found a way to bind those actions to the gesture of scrolling on the Magic Trackpad 2

EDIT: Currently working around by highlighting then scrolling with one finger

@kylecarbs
Copy link
Member

We're making this a priority. Thanks for the upvotes everyone, shows us it's in high demand 👀.

@neilalexander
Copy link

@mjsamberg The app container scrolling should be fixed in the code-server 3.0 releases — certainly it appears to be better for me now in code-server 3.0.2.

I can confirm though that neither the Magic Mouse 2 nor the Magic Trackpad 2 scrolling works in 3.0.2 though. Scrolling using the touchscreen does work, although it feels slow due to the fact that there is no scroll momentum.

@mjsamberg
Copy link

@neilalexander App container scrolling still occurs with my logitech mouse and the scroll wheel.

@cmoog
Copy link
Contributor

cmoog commented Apr 6, 2020

Update on progress towards iPad trackpad/mouse support:

After investigation, we've determined that this issue will require a significant patch to the VSCode scroll/touch handling logic and/or a patch to the WebKit events for iPad trackpad and mouse.

VSCode handles all scrolling logic manually, nearly all scrollable elements have overflow: hidden. It uses wheel and touchmove events for desktop and mobile position calculations, respectively. Counterintuitively, Safair emits pointermove events when the cursor/trackpad is scrolled on iPad. pointermove encodes the (x, y) position of the cursor, which during scrolling is completely useless in determining the scroll delta. Our attempts to surpass this limitation of the iPad's pointer-events and override all existing scroll logic have yielded nothing more than brutally buggy results.

TLDR: We believe it's likely that WebKit will improve its handling of trackpad/mouse scrolling in the near future. When this happens, we will promptly add support.

@cmoog cmoog added blocked This issue cannot proceed due to external factors and removed needs-investigation labels Apr 6, 2020
@claytonwinders
Copy link

Thanks for the update, I had experienced weird behavior elsewhere so I assumed it was doing something under the hood

@cmoog
Copy link
Contributor

cmoog commented Apr 21, 2020

Another update

Please reference this WebKit issue for progress towards a patch.

@diegosucaria
Copy link

Hello, has somebody found any other workaround for this? (even if it is buggy) I mean, other than using the scrollbars.

code-server and an Ipad pro with magic keyboard (which includes trackpad) is awesome!

@mjsamberg
Copy link

I did notice, FWIW, that scrolling does work as expected in Google Docs website on iPad in multiple directions and even when there are multiple scrollable elements on the screen.

@perelin
Copy link

perelin commented Jun 7, 2020

@mjsamberg the faulty interaction between iPad trackpad and the code-server editor view seems to be an edge case. I see a lot of complex web apps handling scrolling stuff without any issue (gdocs, office356, dropbox, etc). The mentioned WebKit issue linked by @cmoog also has no movement at all so far.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 9, 2020

@perelin VS Code's editor handles scrolling manually so that it doesn't have to load the entire file into memory all at once. The ability to control scrolling manually is what's unsupported by webkit on iOS.

@danielscottjames
Copy link

Curious, has anyone played around with this on iOS 14 beta yet and noticed a difference?

@mjsamberg
Copy link

@danielscottjames Just tried it, no difference.

@diegosucaria
Copy link

Oh, that is heartbreaking @mjsamberg. I was hoping it would work.

@csy1203
Copy link

csy1203 commented Jul 19, 2020

I hope any improvement of this case.

@jeffstahlnecker
Copy link

Don’t we all...

@preslavrachev
Copy link

Same here 😔

@kschembri
Copy link

I can also report this issue, scrolling on the magic keyboard for iPad just scrolls the entire browser window and not the editor pane

@ambichetan
Copy link

ambichetan commented Feb 1, 2021

Hooray!, I can confirm that the scrolling issue is fixed on the latest iPadOS 14.5 dev beta 1. Welcome to true coding on iPad fellas. Super happy 😃 🔥 🚀

RPReplay_Final1612209678.2.mov

@danielsteiner
Copy link

Yup. Can confirm - works fine on 14.5 :)

Now I can finally replace my laptop for on the go sessions!

@Dids
Copy link

Dids commented Feb 2, 2021

Does this require a new version of code-server?

Updated my iPad Air 2020 to 14.5, but still can't scroll with my Magic Keyboard. Clicking now works consistently though.

@danielsteiner
Copy link

No. This was not a bug at code-Server (or vs-code to be precise) but safari.

@Dids
Copy link

Dids commented Feb 2, 2021

No. This was not a bug at code-Server (or vs-code to be precise) but safari.

Interesting (and thanks for confirming), wonder why I can't get it to work then. Will try a few reboots and reattaching the keyboard, but also wondering if there's an experimental Safari setting or something that enables/disables it.

I can use the trackpad to scroll everywhere else as usual (outside of code-server), but in code-server scroll events don't seem to register at all. Touch screen scrolling works as expected.
Additionally, both left and right click seem to work on the trackpad using single/two finger tapping.

EDIT: Can anyone confirm if they have these two settings enabled under Settings -> Safari -> Experimental features?
Screenshot

@lboller
Copy link

lboller commented Feb 2, 2021

Interesting (and thanks for confirming), wonder why I can't get it to work then. Will try a few reboots and reattaching the keyboard, but also wondering if there's an experimental Safari setting or something that enables/disables it.

I had the same problem, but scrolling works if you add the site to the home screen and open as a PWA.

@clsx524
Copy link

clsx524 commented Feb 2, 2021

Can confirm it works in the PWA but not working in a tab in safari.

Also @Dids I don’t have any settings for Settings -> Safari

@danielsteiner
Copy link

Works fine for me in a browser tab as well.

@izewang
Copy link

izewang commented Feb 3, 2021

Works for me as PWA. While in browser, scroll works only when the URL bar is hidden. It doesn't matter whether the "Wheel" settings are on or off.

@bbruenings
Copy link

bbruenings commented Feb 18, 2021

No. This was not a bug at code-Server (or vs-code to be precise) but safari.

Interesting (and thanks for confirming), wonder why I can't get it to work then. Will try a few reboots and reattaching the keyboard, but also wondering if there's an experimental Safari setting or something that enables/disables it.

I can use the trackpad to scroll everywhere else as usual (outside of code-server), but in code-server scroll events don't seem to register at all. Touch screen scrolling works as expected.
Additionally, both left and right click seem to work on the trackpad using single/two finger tapping.

EDIT: Can anyone confirm if they have these two settings enabled under Settings -> Safari -> Experimental features?
Screenshot

Yes. Just updated to iPadOS 14.5 beta 2. Both flags are visible and enabled. Scrolling now works as expected using the Magic Keyboard Trackpad.

Update: Both as „Tab“ and „PWA“

@Dids
Copy link

Dids commented Feb 22, 2021

I can confirm that scrolling with a Magic Keyboard + latest iPad Air (iPadOS 14.5 b2) only works when a) using PWA or b) specifically hiding the address bar in Safari.

Does anyone actually know why this happens and are some of the reports here truly saying it "just works" for them in Safari, while the address bar is visible and not running as a PWA?

I've even tried rolling my own web view wrapper apps, enabling app domains for increased API support, but nothing seems to work outside of the two solutions above. As it currently is, this seems very janky and hacky, but at this point I can't even tell if this is intended behavior or something the WebKit or iOS/iPadOS developers should fix?

@csy1203
Copy link

csy1203 commented Feb 22, 2021 via email

@danielsteiner
Copy link

danielsteiner commented Feb 22, 2021

I can confirm that scrolling with a Magic Keyboard + latest iPad Air (iPadOS 14.5 b2) only works when a) using PWA or b) specifically hiding the address bar in Safari.

Does anyone actually know why this happens and are some of the reports here truly saying it "just works" for them in Safari, while the address bar is visible and not running as a PWA?

I've even tried rolling my own web view wrapper apps, enabling app domains for increased API support, but nothing seems to work outside of the two solutions above. As it currently is, this seems very janky and hacky, but at this point I can't even tell if this is intended behavior or something the WebKit or iOS/iPadOS developers should fix?

Ever imagined, that there are people where „it just works“?
For me it works:
*) In a Browser Tab with Adressbar shown
*) In a Browser Tab with Adressbar hidden
*) As PWA
*) In thirdparty apps

Since the first developer beta of 14.5

Maybe its an iPad Air issue. Works fine for anyone using an iPad Pro here…

Edit: and this is still not an issue of code-server but an Safari bug.

@izewang
Copy link

izewang commented Feb 22, 2021

I can confirm that scrolling with a Magic Keyboard + latest iPad Air (iPadOS 14.5 b2) only works when a) using PWA or b) specifically hiding the address bar in Safari.
Does anyone actually know why this happens and are some of the reports here truly saying it "just works" for them in Safari, while the address bar is visible and not running as a PWA?
I've even tried rolling my own web view wrapper apps, enabling app domains for increased API support, but nothing seems to work outside of the two solutions above. As it currently is, this seems very janky and hacky, but at this point I can't even tell if this is intended behavior or something the WebKit or iOS/iPadOS developers should fix?

Ever imagined, that there are people where „it just works“?
For me it works:
*) In a Browser Tab with Adressbar shown
*) In a Browser Tab with Adressbar hidden
*) As PWA
*) In thirdparty apps

Since the first developer beta of 14.5

Maybe its an iPad Air issue. Works fine for anyone using an iPad Pro here…

Edit: and this is still not an issue of code-server but an Safari bug.

I am having the issue that cannot scroll in browser tab with address bar shown on my iPad Pro 12.9''. Since the first beta of 14.5 and the latest version of code-server. :( Seems not a issue only on ipad air.

@jsjoeio jsjoeio added this to the v3.9.2 milestone Feb 24, 2021
@jsjoeio jsjoeio modified the milestones: v3.9.2, v3.9.3 Mar 16, 2021
@wil-code
Copy link

wil-code commented Mar 21, 2021

I can confirm that issue will be solved with iPadOS 14.5. I’m using an iPad Air (4th generation).

@mcmans
Copy link

mcmans commented Apr 26, 2021

Works on 14.5 now using PWA/Adding to home screen.

@awahlig
Copy link
Author

awahlig commented Apr 26, 2021

For me it works on iPadOS 14.5 (2018 iPad Pro 11”) both in Safari and in PWA. 🎉

Menu / Help / About:
code-server: v3.9.3
VS Code: v1.54.2

EDIT:
After further testing, it looks like in Safari it works only when typing (when the keyboard bar is visible). In PWA it works all the time.

@jsjoeio jsjoeio self-assigned this Apr 28, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Apr 28, 2021

Confirmed as well.

Working on iPadOS 14.5 when you add code-server to your home screen/PWA. Tested with code-server 3.9.3

Screenshot

RPReplay_Final1619643901.MP4

Given that iPadOS 14.5 was released to the public on April 26 (see release notes) and we know this is working, I'm going to close this.

@jsjoeio jsjoeio closed this as completed Apr 28, 2021
@coder coder locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked This issue cannot proceed due to external factors browser-safari Safari related
Projects
None yet
Development

No branches or pull requests