diff --git a/package.json b/package.json index 2f59a592b2d..ababe592bf5 100644 --- a/package.json +++ b/package.json @@ -248,6 +248,7 @@ "@opentelemetry/semantic-conventions": "1.0.1", "@popperjs/core": "2.11.2", "@react-aria/button": "3.3.4", + "@react-aria/dialog": "3.1.4", "@react-aria/focus": "3.5.0", "@react-aria/interactions": "3.7.0", "@react-aria/menu": "3.3.0", diff --git a/packages/grafana-ui/package.json b/packages/grafana-ui/package.json index 01a9fadac02..2757852e791 100644 --- a/packages/grafana-ui/package.json +++ b/packages/grafana-ui/package.json @@ -40,6 +40,7 @@ "@monaco-editor/react": "4.3.1", "@popperjs/core": "2.11.2", "@react-aria/button": "3.3.4", + "@react-aria/dialog": "3.1.4", "@react-aria/focus": "3.5.0", "@react-aria/menu": "3.3.0", "@react-aria/overlays": "3.7.3", diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx index ff99b57c90e..84767c4fb92 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx +++ b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx @@ -104,9 +104,9 @@ class UnThemedColorPickerPopover extends Reac <> {Object.keys(customPickers).map((key) => { return ( -
+
+ ); })} @@ -118,7 +118,11 @@ class UnThemedColorPickerPopover extends Reac const styles = getStyles(theme); return ( -
+ {/* + tabIndex=-1 is needed here to support highlighting text within the picker when using FocusScope + see https://github.com/adobe/react-spectrum/issues/1604#issuecomment-781574668 + */} +