mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-18 14:44:58 +08:00
Fix handling of the platform onKeyDown
Only call it if the event hasn't been handled yet.
This commit is contained in:
parent
1cfb0e99d4
commit
0214397e27
@ -485,9 +485,10 @@ class LoggedInView extends React.Component<IProps, IState> {
|
||||
unread: true,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
// if we do not have a handler for it, pass it to the platform which might
|
||||
handled = PlatformPeg.get().onKeyDown(ev);
|
||||
}
|
||||
// if we do not have a handler for it, pass it to the platform which might
|
||||
handled = PlatformPeg.get().onKeyDown(ev);
|
||||
if (handled) {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user