Commit cd07c3e6 by Peter Holmberg Committed by GitHub

Fix: Disable draggable panels on small devices (#20629)

* fix for draggable on mobile

* elaborate in code comment
parent 514f2bea
...@@ -58,11 +58,17 @@ function GridWrapper({ ...@@ -58,11 +58,17 @@ function GridWrapper({
} }
} }
/*
Disable draggable if mobile device, solving an issue with unintentionally
moving panels. https://github.com/grafana/grafana/issues/18497
*/
const draggable = width <= 420 ? false : isDraggable;
return ( return (
<ReactGridLayout <ReactGridLayout
width={lastGridWidth} width={lastGridWidth}
className={className} className={className}
isDraggable={isDraggable} isDraggable={draggable}
isResizable={isResizable} isResizable={isResizable}
containerPadding={[0, 0]} containerPadding={[0, 0]}
useCSSTransforms={false} useCSSTransforms={false}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment