Skip to content

Commit 459e4bf

Browse files
authored
fix: do not set touch-action: none on dashboard to allow scroll (#10033) (#10035)
1 parent 03d331c commit 459e4bf

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/dashboard/src/vaadin-dashboard-widget.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ class DashboardWidget extends DashboardItemMixin(ElementMixin(ThemableMixin(Poly
137137
inset-inline-end: 0;
138138
z-index: 1;
139139
overflow: hidden;
140+
touch-action: none;
140141
}
141142
142143
:host([resizing])::after {

packages/dashboard/src/widget-resize-controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* See https://vaadin.com/commercial-license-and-service-terms for the full
99
* license.
1010
*/
11-
import { addListener } from '@vaadin/component-base/src/gestures.js';
11+
import { addListener, setTouchAction } from '@vaadin/component-base/src/gestures.js';
1212
import { getElementItem, itemsEqual, WRAPPER_LOCAL_NAME } from './vaadin-dashboard-helpers.js';
1313

1414
/**
@@ -20,6 +20,8 @@ export class WidgetResizeController {
2020
this.__resizedElementRemoveObserver = new MutationObserver(() => this.__restoreResizedElement());
2121
this.__touchMoveCancelListener = (e) => e.preventDefault();
2222
addListener(host, 'track', (e) => this.__onTrack(e));
23+
// Do not set touch-action: none to allow scroll on mobile
24+
setTouchAction(host, '');
2325
host.addEventListener('item-resize', (e) => this.__itemResize(e));
2426
}
2527

0 commit comments

Comments
 (0)