code-server icon indicating copy to clipboard operation
code-server copied to clipboard

Can’t scroll on iPad with a trackpad.

Open awahlig opened this issue 6 years ago • 61 comments

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.

awahlig avatar Mar 25 '20 19:03 awahlig

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?

dvelopin avatar Mar 25 '20 19:03 dvelopin

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

mjsamberg avatar Mar 26 '20 02:03 mjsamberg

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

claytonwinders avatar Mar 28 '20 16:03 claytonwinders

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

kylecarbs avatar Mar 30 '20 14:03 kylecarbs

@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.

neilalexander avatar Apr 06 '20 15:04 neilalexander

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

mjsamberg avatar Apr 06 '20 20:04 mjsamberg

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 avatar Apr 06 '20 20:04 cmoog

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

claytonwinders avatar Apr 06 '20 20:04 claytonwinders

Another update

Please reference this WebKit issue for progress towards a patch.

cmoog avatar Apr 21 '20 19:04 cmoog

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!

diegosucaria avatar May 28 '20 11:05 diegosucaria

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.

mjsamberg avatar Jun 06 '20 20:06 mjsamberg

@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.

perelin avatar Jun 07 '20 09:06 perelin

@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.

nhooyr avatar Jun 09 '20 18:06 nhooyr

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

danielscottjames avatar Jun 24 '20 23:06 danielscottjames

@danielscottjames Just tried it, no difference.

mjsamberg avatar Jun 25 '20 00:06 mjsamberg

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

diegosucaria avatar Jun 25 '20 15:06 diegosucaria

I hope any improvement of this case.

csy1203 avatar Jul 19 '20 11:07 csy1203

Don’t we all...

jeffstahlnecker avatar Aug 04 '20 07:08 jeffstahlnecker

Same here 😔

preslavrachev avatar Aug 22 '20 07:08 preslavrachev

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

kschembri avatar Aug 23 '20 15:08 kschembri