mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-15 03:30:29 +03:00
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
Some checks failed
Deploy to Netlify (dev) / Deploy to Netlify (push) Has been cancelled
This commit is contained in:
parent
b3497d9ed6
commit
31c6d13fdf
6 changed files with 40 additions and 42 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue