diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx index 52e96c088c200..30bd1396d640f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/select_rule_type/index.tsx @@ -6,6 +6,7 @@ */ import React, { useCallback, useMemo } from 'react'; +import { css } from '@emotion/css'; import { EuiCard, EuiFlexGrid, EuiFlexItem, EuiFormRow, EuiIcon } from '@elastic/eui'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; @@ -99,6 +100,23 @@ export const SelectRuleType: React.FC = ({ [ruleType, setNewTerms] ); + // TODO: custom css shouldn't be necessary after https://github.com/elastic/eui/issues/6345 + // tested this placeholder fix on mac in Chrome, Firefox, Safari, and Edge + // with multiple zoom levels and with keyboard navigation + // and in a responsive design / mobile view + const cardStyles = css` + padding-bottom: 60px; + position: relative; + + button { + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-radius: 0; + } + `; + return ( = ({ icon={} selectable={querySelectableConfig} layout="horizontal" + className={cardStyles} /> )} @@ -131,6 +150,7 @@ export const SelectRuleType: React.FC = ({ isDisabled={mlSelectableConfig.isDisabled && !mlSelectableConfig.isSelected} selectable={mlSelectableConfig} layout="horizontal" + className={cardStyles} /> )} @@ -144,6 +164,7 @@ export const SelectRuleType: React.FC = ({ icon={} selectable={thresholdSelectableConfig} layout="horizontal" + className={cardStyles} /> )} @@ -157,6 +178,7 @@ export const SelectRuleType: React.FC = ({ icon={} selectable={eqlSelectableConfig} layout="horizontal" + className={cardStyles} /> )} @@ -170,6 +192,7 @@ export const SelectRuleType: React.FC = ({ icon={} selectable={threatMatchSelectableConfig} layout="horizontal" + className={cardStyles} /> )} @@ -183,6 +206,7 @@ export const SelectRuleType: React.FC = ({ icon={} selectable={newTermsSelectableConfig} layout="horizontal" + className={cardStyles} /> )}