From 931feac36f32d32c8be17b78b42c3b62350f7937 Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Wed, 1 Nov 2023 16:18:39 +0100 Subject: [PATCH] fix(single select): blur when actually blurring the input --- components/select/src/select/input-wrapper.js | 7 ------- components/select/src/select/select.js | 4 +++- .../single-select/features/accepts_blur_cb/index.js | 10 +++++++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/select/src/select/input-wrapper.js b/components/select/src/select/input-wrapper.js index a891659cc7..1943fc744c 100644 --- a/components/select/src/select/input-wrapper.js +++ b/components/select/src/select/input-wrapper.js @@ -8,7 +8,6 @@ const InputWrapper = ({ dataTest, onToggle, children, - tabIndex, error, warning, valid, @@ -29,7 +28,6 @@ const InputWrapper = ({
@@ -97,14 +95,9 @@ const InputWrapper = ({ ) } -InputWrapper.defaultProps = { - tabIndex: '0', -} - InputWrapper.propTypes = { dataTest: PropTypes.string.isRequired, inputRef: PropTypes.object.isRequired, - tabIndex: PropTypes.string.isRequired, onToggle: PropTypes.func.isRequired, children: PropTypes.element, className: PropTypes.string, diff --git a/components/select/src/select/select.js b/components/select/src/select/select.js index d1d80de126..7626ab9ca2 100644 --- a/components/select/src/select/select.js +++ b/components/select/src/select/select.js @@ -182,16 +182,17 @@ export class Select extends Component { return (
{ + cy.window().then((win) => { + win.onChange.reset() + win.onFocus.reset() + win.onBlur.reset() + }) +}) Given('a SingleSelect with onBlur handler is rendered', () => { cy.visitStory('SingleSelect', 'With onBlur')