Compare commits

..

2 Commits

Author SHA1 Message Date
Ajay Bura
69b6055353 v2.0.3 2022-05-15 10:39:42 +05:30
Ajay Bura
1bdd0449e0 Fix edit message not working (#552) 2022-05-14 20:05:43 +05:30
4 changed files with 9 additions and 6 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cinny",
"version": "2.0.2",
"version": "2.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "cinny",
"version": "2.0.2",
"version": "2.0.3",
"license": "MIT",
"dependencies": {
"@fontsource/inter": "^4.5.10",

View File

@@ -1,6 +1,6 @@
{
"name": "cinny",
"version": "2.0.2",
"version": "2.0.3",
"description": "Yet another matrix client",
"main": "index.js",
"engines": {

View File

@@ -41,14 +41,17 @@ function listenKeyboard(event) {
if (event.code === 'KeyV') {
if (navigation.isRawModalVisible) return;
const msgTextarea = document.getElementById('message-textarea');
if (document.activeElement !== msgTextarea && document.activeElement.tagName.toLowerCase() === 'input') return;
const { activeElement } = document;
if (activeElement !== msgTextarea
&& ['input', 'textarea'].includes(activeElement.tagName.toLowerCase())
) return;
msgTextarea?.focus();
}
}
if (!event.ctrlKey && !event.altKey && !event.metaKey) {
if (navigation.isRawModalVisible) return;
if (document.activeElement.tagName.toLowerCase() === 'input') {
if (['input', 'textarea'].includes(document.activeElement.tagName.toLowerCase())) {
return;
}

View File

@@ -1,5 +1,5 @@
const cons = {
version: '2.0.2',
version: '2.0.3',
secretKey: {
ACCESS_TOKEN: 'cinny_access_token',
DEVICE_ID: 'cinny_device_id',