fix ctrl + k hotkey not working for browser with some extensions (#2481)
This commit is contained in:
@@ -79,9 +79,8 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
||||
useCallback(
|
||||
(evt) => {
|
||||
if (editableActiveElement()) return;
|
||||
// means some menu or modal window is open
|
||||
const lastNode = document.body.lastElementChild;
|
||||
if (lastNode && !lastNode.hasAttribute('data-last-node')) {
|
||||
const portalContainer = document.getElementById('portalContainer');
|
||||
if (portalContainer && portalContainer.children.length > 0) {
|
||||
return;
|
||||
}
|
||||
if (shouldFocusMessageField(evt) || isKeyHotkey('mod+v', evt)) {
|
||||
|
||||
@@ -434,9 +434,8 @@ export function SearchModalRenderer() {
|
||||
return;
|
||||
}
|
||||
|
||||
// means some menu or modal window is open
|
||||
const lastNode = document.body.lastElementChild;
|
||||
if (lastNode && !lastNode.hasAttribute('data-last-node')) {
|
||||
const portalContainer = document.getElementById('portalContainer');
|
||||
if (portalContainer && portalContainer.children.length > 0) {
|
||||
return;
|
||||
}
|
||||
setOpen(true);
|
||||
|
||||
Reference in New Issue
Block a user