Skip to content

Commit 98fdb83

Browse files
authored
fix(Dropdown): check for blur() before calling it Semantic-Org#659
1 parent b82ddaa commit 98fdb83

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/modules/Dropdown/Dropdown.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,10 @@ export default class Dropdown extends Component {
930930
// https://github.com/Semantic-Org/Semantic-UI-React/issues/627
931931
// Blur the Dropdown on close so it is blurred after selecting an item.
932932
// This is to prevent it from re-opening when switching tabs after selecting an item.
933-
this._dropdown.blur()
933+
//fix(Dropdown): check for blur() before calling it #659
934+
if (this._dropdown && typeof this._dropdown.blur === 'function') {
935+
this._dropdown.blur()
936+
};
934937

935938
// We need to keep the virtual model in sync with the browser focus change
936939
// https://github.com/Semantic-Org/Semantic-UI-React/issues/692

0 commit comments

Comments
 (0)