prevent focus from sticking to tab after click (#4078)
After clicking on a reader tab, the reader will get focused but the default mousedown event handler can then shift focus onto the actual tab. It looks like the focus gets "lost", and breaks reader keyboard shortcuts so we want to avoid it. Mainly happens on windows. Fixes: #4077
This commit is contained in:
parent
04748ec9a6
commit
debcb9944d
1 changed files with 2 additions and 0 deletions
|
@ -128,6 +128,8 @@ const TabBar = forwardRef(function (props, ref) {
|
|||
}
|
||||
props.onTabSelect(id);
|
||||
event.stopPropagation();
|
||||
// Prevents focus from sticking to the actual tab on windows
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function handleTabClick(event, id) {
|
||||
|
|
Loading…
Reference in a new issue