Skip to content

Commit

Permalink
fix(list-box): Prevent focus on icon inside selection (carbon-design-…
Browse files Browse the repository at this point in the history
…system#782)

* fix(list-box): Prevent focus on icon inside selection

This prevents a weird issue in IE where focus on the svg causes an
exception in downshift.

* fix(combo-box): Review comments

* fix(combo-box): update snapshot
  • Loading branch information
Paul Sachs authored and joshblack committed Apr 4, 2018
1 parent 8071ab0 commit 53605d4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ListBox/ListBoxSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const ListBoxSelection = ({
onKeyDown={handleOnKeyDown}
title={description}>
{selectionCount}
<Icon name="close" description={description} />
<Icon name="close" description={description} focusable="false" />
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ exports[`ListBoxField should render 1`] = `
<Icon
description="Clear selected item"
fillRule="evenodd"
focusable="false"
name="close"
role="img"
>
<svg
alt="Clear selected item"
aria-label="Clear selected item"
fillRule="evenodd"
focusable="false"
height="10"
name="close"
role="img"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ exports[`ListBoxSelection should render 1`] = `
<Icon
description="translation"
fillRule="evenodd"
focusable="false"
name="close"
role="img"
>
<svg
alt="translation"
aria-label="translation"
fillRule="evenodd"
focusable="false"
height="10"
name="close"
role="img"
Expand Down Expand Up @@ -82,13 +84,15 @@ exports[`ListBoxSelection should render 2`] = `
<Icon
description="translation"
fillRule="evenodd"
focusable="false"
name="close"
role="img"
>
<svg
alt="translation"
aria-label="translation"
fillRule="evenodd"
focusable="false"
height="10"
name="close"
role="img"
Expand Down

0 comments on commit 53605d4

Please sign in to comment.