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

Should be able to drag tab using touch device #635

Closed
Andrew-Bx opened this issue Apr 7, 2021 · 2 comments
Closed

Should be able to drag tab using touch device #635

Andrew-Bx opened this issue Apr 7, 2021 · 2 comments

Comments

@Andrew-Bx
Copy link
Contributor

Current behavior
When dragging a tab using a touch device (or just a desktop browser in responsive design mode), the tab starts to move
but then gets frozen (i.e. stops following the touch pointer).

Expected behavior:
The tab should follow the touch pointer, the same as it does when using a mouse pointer.

Codepen example:
This can be seen with the default codepen ( https://codepen.io/ButchMonkey/pen/GzGZey ) and the apitest.

I know there have been similar issues raised in the past (e.g. #4 and #148), and this might be a subset of #500, but this is the main/only issue we have using touchscreen with golden-layout at the moment.

I've had a go at fixing it (combination of 'touch-action: none;' and using PointerEvents) so will submit a PR.
Also I resurrected the related tests (but didn't go as far as resurrecting them all).
I've only tested in Chrome and Firefox.

btw, thanks to everyone that's worked on golden-layout, it's a great project, and good to see it revived in the last year.

@pbklink
Copy link
Contributor

pbklink commented Apr 8, 2021

@Andrew-Bx, Thanks for submitting PR #636. I will review when I get back from holidays next week.

martin31821 added a commit that referenced this issue Apr 15, 2021
* Start converting tests to typescript
Restore drag-tests

* Improve touchscreen support for dragging panels:
* add touch-action:none to tabs
* replace MouseEvent and TouchEvent with PointerEvent in drag-listener

* Regenerate package-lock.json

Co-authored-by: Martin Koppehel <martin@mko.dev>
@martin31821
Copy link
Member

Closing as per release 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants