Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit fcbbb7e

Browse files
committed
Stop focus event propagation
1 parent 960a66f commit fcbbb7e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/views/tabbable.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,15 @@ export function makeTabbable(Component, options = {}) {
7373
this.elementRef.map(element => this.props.tabGroup.removeElement(element));
7474
}
7575

76-
focusNext = () => this.elementRef.map(element => this.props.tabGroup.focusAfter(element));
76+
focusNext = e => {
77+
this.elementRef.map(element => this.props.tabGroup.focusAfter(element));
78+
e.stopPropagation();
79+
}
7780

78-
focusPrevious = () => this.elementRef.map(element => this.props.tabGroup.focusBefore(element));
81+
focusPrevious = e => {
82+
this.elementRef.map(element => this.props.tabGroup.focusBefore(element));
83+
e.stopPropagation();
84+
}
7985
};
8086
}
8187

0 commit comments

Comments
 (0)