diff --git a/packages/core/src/cells/number-cell.tsx b/packages/core/src/cells/number-cell.tsx index fd7d37260..9592506ac 100644 --- a/packages/core/src/cells/number-cell.tsx +++ b/packages/core/src/cells/number-cell.tsx @@ -27,7 +27,7 @@ export const numberCellRenderer: InternalCellRenderer = { = { diff --git a/packages/core/src/cells/text-cell.tsx b/packages/core/src/cells/text-cell.tsx index ce3a081ab..0e44ab7bb 100644 --- a/packages/core/src/cells/text-cell.tsx +++ b/packages/core/src/cells/text-cell.tsx @@ -71,7 +71,7 @@ export const textCellRenderer: InternalCellRenderer = { style={cell.allowWrapping === true ? { padding: "3px 8.5px" } : undefined} highlight={isHighlighted} autoFocus={value.readonly !== true} - disabled={value.readonly === true} + readOnly={value.readonly === true} altNewline={true} value={value.data} validatedSelection={validatedSelection} diff --git a/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.tsx b/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.tsx index 0b19ab6d4..6eb5b9192 100644 --- a/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.tsx +++ b/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.tsx @@ -47,6 +47,10 @@ export const DataGridOverlayEditorStyle = styled.div` 0px 6px 12px rgba(62, 65, 86, 0.15); animation: glide_fade_in 60ms 1; + + &:focus { + outline: none; + } } &.gdg-pad { diff --git a/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx b/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx index 28850bcbc..45b8af616 100644 --- a/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx +++ b/packages/core/src/internal/data-grid-overlay-editor/data-grid-overlay-editor.tsx @@ -220,16 +220,23 @@ const DataGridOverlayEditor: React.FunctionComponent onClickOutside={onClickOutside} isOutsideClick={isOutsideClick}> { + ref(elem); + if (elem) elem.focus(); + }} id={id} + data-testid="data-grid-overlay-editor" className={classWrap} style={styleOverride} as={useLabel === true ? "label" : undefined} targetX={target.x - bloomX} targetY={target.y - bloomY} targetWidth={target.width + bloomX * 2} - targetHeight={target.height + bloomY * 2}> -
+ targetHeight={target.height + bloomY * 2} + tabIndex={-1} + onKeyDown={onKeyDown} + > +
{editor}
diff --git a/packages/core/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.tsx b/packages/core/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.tsx index 6fefcd931..bfcdcf22f 100644 --- a/packages/core/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.tsx +++ b/packages/core/src/internal/data-grid-overlay-editor/private/bubbles-overlay-editor.tsx @@ -14,7 +14,6 @@ const BubblesOverlayEditor: React.FunctionComponent = p => { {b}
))} -