fix ctrl + k hotkey not working for browser with some extensions (#2481)
Some checks failed
Deploy to Netlify (dev) / Deploy to Netlify (push) Has been cancelled

This commit is contained in:
Ajay Bura 2025-09-12 17:22:51 +05:30 committed by GitHub
parent b3497d9ed6
commit 31c6d13fdf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 42 deletions

View file

@ -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)) {

View file

@ -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);