From a654cf7e561d69b10c7827853c8f165fe93ba2dc Mon Sep 17 00:00:00 2001 From: Mohamed Date: Sat, 30 Mar 2019 14:20:33 +0200 Subject: [PATCH 1/4] added functionality in issue #13929 --- app/emoji/client/emojiPicker.html | 2 +- app/ui-message/client/messageBox.js | 5 +- package-lock.json | 292 +++++----------------------- 3 files changed, 53 insertions(+), 246 deletions(-) diff --git a/app/emoji/client/emojiPicker.html b/app/emoji/client/emojiPicker.html index 6cb450e9d40a..bf3e219ddd13 100644 --- a/app/emoji/client/emojiPicker.html +++ b/app/emoji/client/emojiPicker.html @@ -7,7 +7,7 @@
{{> icon block="rc-input__icon-svg" icon="magnifier" }}
- + diff --git a/app/ui-message/client/messageBox.js b/app/ui-message/client/messageBox.js index ebb590cdedd9..5438d6417744 100644 --- a/app/ui-message/client/messageBox.js +++ b/app/ui-message/client/messageBox.js @@ -146,6 +146,10 @@ Template.messageBox.onCreated(function() { this.isMicrophoneDenied = new ReactiveVar(true); this.sendIconDisabled = new ReactiveVar(false); messageBox.emit('created', this); + window.addEventListener('keydown',function(e){ + if(e.key==='Escape'){ + EmojiPicker.close()} + }) navigator.permissions.query({ name: 'microphone' }) .then((permissionStatus) => { @@ -314,7 +318,6 @@ Template.messageBox.events({ const caretPos = input.selectionStart; const textAreaTxt = input.value; - input.focus(); if (!document.execCommand || !document.execCommand('insertText', false, emojiValue)) { input.value = textAreaTxt.substring(0, caretPos) + emojiValue + textAreaTxt.substring(caretPos); diff --git a/package-lock.json b/package-lock.json index c839d30201b5..48b045242d76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3936,16 +3936,6 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", @@ -4263,13 +4253,11 @@ "chromedriver": "^2.35", "colors": "1.1.2", "commander": "^2.9.0", - "cucumber": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", "deep-extend": "^0.4.1", "exit": "^0.1.2", "fibers": "^1.0.14", "freeport": "~1.0.5", "fs-extra": "^1.0.0", - "glob": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", "hapi": "8.8.0", "jasmine": "^2.4.1", "loglevel": "~1.4.0", @@ -4307,6 +4295,27 @@ "type-detect": "^4.0.0" } }, + "cucumber": { + "version": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", + "from": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", + "requires": { + "camel-case": "^3.0.0", + "cli-table": "^0.3.1", + "co": "^4.6.0", + "colors": "^1.1.2", + "commander": "^2.9.0", + "duration": "^0.2.0", + "fibers": "^1.0.7", + "figures": "1.7.0", + "gherkin": "4.0.0", + "glob": "^7.0.0", + "is-generator": "^1.0.2", + "lodash": "^4.0.0", + "meteor-promise": "^0.8.0", + "stack-chain": "^1.3.5", + "stacktrace-js": "^1.3.0" + } + }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -4325,13 +4334,11 @@ "fibers": { "version": "1.0.15", "resolved": "https://registry.npmjs.org/fibers/-/fibers-1.0.15.tgz", - "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=", - "dev": true + "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=" }, "glob": { - "version": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", - "from": "github:lucetius/node-glob#chimp", - "dev": true, + "version": "7.1.1", + "resolved": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4408,8 +4415,7 @@ "once": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.0.tgz", - "integrity": "sha1-FRr4a/wfCMS58H0GqyUP/L61ZYE=", - "dev": true + "integrity": "sha1-FRr4a/wfCMS58H0GqyUP/L61ZYE=" }, "progress": { "version": "1.1.8", @@ -4555,23 +4561,6 @@ "restore-cursor": "^2.0.0" } }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "dev": true, - "requires": { - "colors": "1.0.3" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } - } - }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", @@ -4689,8 +4678,7 @@ "colors": { "version": "1.1.2", "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" }, "colour": { "version": "0.7.1", @@ -5112,36 +5100,6 @@ "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=", "dev": true }, - "cucumber": { - "version": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", - "from": "github:xolvio/cucumber-js#v1.3.0-chimp.6", - "dev": true, - "requires": { - "camel-case": "^3.0.0", - "cli-table": "^0.3.1", - "co": "^4.6.0", - "colors": "^1.1.2", - "commander": "^2.9.0", - "duration": "^0.2.0", - "fibers": "^1.0.7", - "figures": "1.7.0", - "gherkin": "4.0.0", - "glob": "^7.0.0", - "is-generator": "^1.0.2", - "lodash": "^4.0.0", - "meteor-promise": "^0.8.0", - "stack-chain": "^1.3.5", - "stacktrace-js": "^1.3.0" - }, - "dependencies": { - "fibers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/fibers/-/fibers-1.0.15.tgz", - "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=", - "dev": true - } - } - }, "cuid": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/cuid/-/cuid-1.3.8.tgz", @@ -5179,15 +5137,6 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, - "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", - "dev": true, - "requires": { - "es5-ext": "^0.10.9" - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -5625,16 +5574,6 @@ "stream-shift": "^1.0.0" } }, - "duration": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", - "integrity": "sha512-06kgtea+bGreF5eKYgI/36A6pLXggY7oR4p1pq4SmdFBn1ReOL5D8RhG64VrqfTTKNucqqtBAwEj8aB88mcqrg==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.46" - } - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -5809,15 +5748,6 @@ } } }, - "error-stack-parser": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", - "integrity": "sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=", - "dev": true, - "requires": { - "stackframe": "^0.3.1" - } - }, "es-abstract": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", @@ -5840,28 +5770,6 @@ "is-symbol": "^1.0.2" } }, - "es5-ext": { - "version": "0.10.48", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.48.tgz", - "integrity": "sha512-CdRvPlX/24Mj5L4NVxTs4804sxiS2CjVprgCmrgoDkdmjdY4D+ySHa7K3jJf8R40dFg0tIm3z/dk326LrnuSGw==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "1" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, "es6-promise": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", @@ -5875,16 +5783,6 @@ "es6-promise": "^4.0.3" } }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -6833,16 +6731,6 @@ "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", "dev": true }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -7175,12 +7063,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7195,17 +7085,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -7322,7 +7215,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -7334,6 +7228,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7348,6 +7243,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7355,12 +7251,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7379,6 +7277,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -7459,7 +7358,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -7471,6 +7371,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -7592,6 +7493,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7756,12 +7658,6 @@ "assert-plus": "^1.0.0" } }, - "gherkin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/gherkin/-/gherkin-4.0.0.tgz", - "integrity": "sha1-edzgTRIj6kO0hip2vlzo+JwSwyw=", - "dev": true - }, "github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -10050,12 +9946,6 @@ "number-is-nan": "^1.0.0" } }, - "is-generator": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", - "integrity": "sha1-wUwhBX7TbjKNuANHlmxpP4hjifM=", - "dev": true - }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -11199,12 +11089,6 @@ "signal-exit": "^3.0.0" } }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -11699,8 +11583,7 @@ "meteor-promise": { "version": "0.8.6", "resolved": "https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz", - "integrity": "sha512-HP6tOr67z/9XU2Dr0F2SSr8WRTuE23AG9Dj578DCJPEYHs67OLKBviU8A8rwvbwMD7Lu2+Of+yAMz2Wd8r4yxg==", - "dev": true + "integrity": "sha512-HP6tOr67z/9XU2Dr0F2SSr8WRTuE23AG9Dj578DCJPEYHs67OLKBviU8A8rwvbwMD7Lu2+Of+yAMz2Wd8r4yxg==" }, "methods": { "version": "1.1.2", @@ -12200,26 +12083,11 @@ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, "node-abi": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.7.1.tgz", @@ -15333,69 +15201,11 @@ "figgy-pudding": "^3.5.1" } }, - "stack-chain": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", - "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=", - "dev": true - }, - "stack-generator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-1.1.0.tgz", - "integrity": "sha1-NvapIHUabBD0maE8Msu19RoLiyU=", - "dev": true, - "requires": { - "stackframe": "^1.0.2" - }, - "dependencies": { - "stackframe": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.0.4.tgz", - "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==", - "dev": true - } - } - }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, - "stackframe": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", - "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=", - "dev": true - }, - "stacktrace-gps": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-2.4.4.tgz", - "integrity": "sha1-acgn6dbW9Bz0ONfxleLjy/zyjEQ=", - "dev": true, - "requires": { - "source-map": "0.5.6", - "stackframe": "~0.3" - }, - "dependencies": { - "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", - "dev": true - } - } - }, - "stacktrace-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-1.3.1.tgz", - "integrity": "sha1-Z8qyWJr1xBe5Yvc2mUAne7O2oYs=", - "dev": true, - "requires": { - "error-stack-parser": "^1.3.6", - "stack-generator": "^1.0.7", - "stacktrace-gps": "^2.4.3" - } - }, "starttls": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/starttls/-/starttls-1.0.1.tgz", @@ -16672,12 +16482,6 @@ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", From cb3203b2de01177111bc62a149e3f61ff0be15ad Mon Sep 17 00:00:00 2001 From: Mohamed Date: Sat, 30 Mar 2019 22:00:38 +0200 Subject: [PATCH 2/4] removed the package-lock.json changes --- package-lock.json | 292 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 244 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 48b045242d76..c839d30201b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3936,6 +3936,16 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", @@ -4253,11 +4263,13 @@ "chromedriver": "^2.35", "colors": "1.1.2", "commander": "^2.9.0", + "cucumber": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", "deep-extend": "^0.4.1", "exit": "^0.1.2", "fibers": "^1.0.14", "freeport": "~1.0.5", "fs-extra": "^1.0.0", + "glob": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", "hapi": "8.8.0", "jasmine": "^2.4.1", "loglevel": "~1.4.0", @@ -4295,27 +4307,6 @@ "type-detect": "^4.0.0" } }, - "cucumber": { - "version": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", - "from": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", - "requires": { - "camel-case": "^3.0.0", - "cli-table": "^0.3.1", - "co": "^4.6.0", - "colors": "^1.1.2", - "commander": "^2.9.0", - "duration": "^0.2.0", - "fibers": "^1.0.7", - "figures": "1.7.0", - "gherkin": "4.0.0", - "glob": "^7.0.0", - "is-generator": "^1.0.2", - "lodash": "^4.0.0", - "meteor-promise": "^0.8.0", - "stack-chain": "^1.3.5", - "stacktrace-js": "^1.3.0" - } - }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", @@ -4334,11 +4325,13 @@ "fibers": { "version": "1.0.15", "resolved": "https://registry.npmjs.org/fibers/-/fibers-1.0.15.tgz", - "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=" + "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=", + "dev": true }, "glob": { - "version": "7.1.1", - "resolved": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", + "version": "github:lucetius/node-glob#51c7ca6e69bfbd17db5f1ea710e3f2a7a457d9ce", + "from": "github:lucetius/node-glob#chimp", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -4415,7 +4408,8 @@ "once": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/once/-/once-1.3.0.tgz", - "integrity": "sha1-FRr4a/wfCMS58H0GqyUP/L61ZYE=" + "integrity": "sha1-FRr4a/wfCMS58H0GqyUP/L61ZYE=", + "dev": true }, "progress": { "version": "1.1.8", @@ -4561,6 +4555,23 @@ "restore-cursor": "^2.0.0" } }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true, + "requires": { + "colors": "1.0.3" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", @@ -4678,7 +4689,8 @@ "colors": { "version": "1.1.2", "resolved": "http://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=" + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true }, "colour": { "version": "0.7.1", @@ -5100,6 +5112,36 @@ "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8=", "dev": true }, + "cucumber": { + "version": "github:xolvio/cucumber-js#cf953cb5b5de30dbcc279f59e4ebff3aa040071c", + "from": "github:xolvio/cucumber-js#v1.3.0-chimp.6", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "cli-table": "^0.3.1", + "co": "^4.6.0", + "colors": "^1.1.2", + "commander": "^2.9.0", + "duration": "^0.2.0", + "fibers": "^1.0.7", + "figures": "1.7.0", + "gherkin": "4.0.0", + "glob": "^7.0.0", + "is-generator": "^1.0.2", + "lodash": "^4.0.0", + "meteor-promise": "^0.8.0", + "stack-chain": "^1.3.5", + "stacktrace-js": "^1.3.0" + }, + "dependencies": { + "fibers": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/fibers/-/fibers-1.0.15.tgz", + "integrity": "sha1-IvA5yPGLhWGQ+75N7PBWFUwerpw=", + "dev": true + } + } + }, "cuid": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/cuid/-/cuid-1.3.8.tgz", @@ -5137,6 +5179,15 @@ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=", "dev": true }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -5574,6 +5625,16 @@ "stream-shift": "^1.0.0" } }, + "duration": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/duration/-/duration-0.2.2.tgz", + "integrity": "sha512-06kgtea+bGreF5eKYgI/36A6pLXggY7oR4p1pq4SmdFBn1ReOL5D8RhG64VrqfTTKNucqqtBAwEj8aB88mcqrg==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.46" + } + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -5748,6 +5809,15 @@ } } }, + "error-stack-parser": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", + "integrity": "sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=", + "dev": true, + "requires": { + "stackframe": "^0.3.1" + } + }, "es-abstract": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", @@ -5770,6 +5840,28 @@ "is-symbol": "^1.0.2" } }, + "es5-ext": { + "version": "0.10.48", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.48.tgz", + "integrity": "sha512-CdRvPlX/24Mj5L4NVxTs4804sxiS2CjVprgCmrgoDkdmjdY4D+ySHa7K3jJf8R40dFg0tIm3z/dk326LrnuSGw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, "es6-promise": { "version": "4.2.5", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", @@ -5783,6 +5875,16 @@ "es6-promise": "^4.0.3" } }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -6731,6 +6833,16 @@ "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==", "dev": true }, + "figures": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", + "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5", + "object-assign": "^4.1.0" + } + }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -7063,14 +7175,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -7085,20 +7195,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -7215,8 +7322,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -7228,7 +7334,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -7243,7 +7348,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -7251,14 +7355,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -7277,7 +7379,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -7358,8 +7459,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -7371,7 +7471,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -7493,7 +7592,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -7658,6 +7756,12 @@ "assert-plus": "^1.0.0" } }, + "gherkin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/gherkin/-/gherkin-4.0.0.tgz", + "integrity": "sha1-edzgTRIj6kO0hip2vlzo+JwSwyw=", + "dev": true + }, "github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -9946,6 +10050,12 @@ "number-is-nan": "^1.0.0" } }, + "is-generator": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz", + "integrity": "sha1-wUwhBX7TbjKNuANHlmxpP4hjifM=", + "dev": true + }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", @@ -11089,6 +11199,12 @@ "signal-exit": "^3.0.0" } }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -11583,7 +11699,8 @@ "meteor-promise": { "version": "0.8.6", "resolved": "https://registry.npmjs.org/meteor-promise/-/meteor-promise-0.8.6.tgz", - "integrity": "sha512-HP6tOr67z/9XU2Dr0F2SSr8WRTuE23AG9Dj578DCJPEYHs67OLKBviU8A8rwvbwMD7Lu2+Of+yAMz2Wd8r4yxg==" + "integrity": "sha512-HP6tOr67z/9XU2Dr0F2SSr8WRTuE23AG9Dj578DCJPEYHs67OLKBviU8A8rwvbwMD7Lu2+Of+yAMz2Wd8r4yxg==", + "dev": true }, "methods": { "version": "1.1.2", @@ -12083,11 +12200,26 @@ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, "node-abi": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.7.1.tgz", @@ -15201,11 +15333,69 @@ "figgy-pudding": "^3.5.1" } }, + "stack-chain": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/stack-chain/-/stack-chain-1.3.7.tgz", + "integrity": "sha1-0ZLJ/06moiyUxN1FkXHj8AzqEoU=", + "dev": true + }, + "stack-generator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stack-generator/-/stack-generator-1.1.0.tgz", + "integrity": "sha1-NvapIHUabBD0maE8Msu19RoLiyU=", + "dev": true, + "requires": { + "stackframe": "^1.0.2" + }, + "dependencies": { + "stackframe": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.0.4.tgz", + "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==", + "dev": true + } + } + }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "stackframe": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", + "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=", + "dev": true + }, + "stacktrace-gps": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/stacktrace-gps/-/stacktrace-gps-2.4.4.tgz", + "integrity": "sha1-acgn6dbW9Bz0ONfxleLjy/zyjEQ=", + "dev": true, + "requires": { + "source-map": "0.5.6", + "stackframe": "~0.3" + }, + "dependencies": { + "source-map": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", + "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=", + "dev": true + } + } + }, + "stacktrace-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/stacktrace-js/-/stacktrace-js-1.3.1.tgz", + "integrity": "sha1-Z8qyWJr1xBe5Yvc2mUAne7O2oYs=", + "dev": true, + "requires": { + "error-stack-parser": "^1.3.6", + "stack-generator": "^1.0.7", + "stacktrace-gps": "^2.4.3" + } + }, "starttls": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/starttls/-/starttls-1.0.1.tgz", @@ -16482,6 +16672,12 @@ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", "dev": true }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", From 5057cae8f7d46046b8e6e78159760dc1593cf69f Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Wed, 16 Oct 2019 22:56:37 -0300 Subject: [PATCH 3/4] fix review --- app/emoji/client/emojiPicker.js | 9 +++++++++ app/emoji/client/lib/EmojiPicker.js | 1 + app/ui-message/client/messageBox/messageBox.js | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/emoji/client/emojiPicker.js b/app/emoji/client/emojiPicker.js index 9bc0b89ff7b0..9040f92ffd5f 100644 --- a/app/emoji/client/emojiPicker.js +++ b/app/emoji/client/emojiPicker.js @@ -7,6 +7,8 @@ import { t } from '../../utils/client'; import { EmojiPicker } from './lib/EmojiPicker'; import { emoji } from '../lib/rocketchat'; +const ESCAPE = 27; + const emojiListByCategory = new ReactiveDict('emojiList'); const getEmojiElement = (emoji, image) => image && `
  • ${ image }
  • `; @@ -226,6 +228,13 @@ Template.emojiPicker.events({ EmojiPicker.pickEmoji(_emoji + tone); }, 'keyup .js-emojipicker-search, change .js-emojipicker-search'(event, instance) { + event.preventDefault(); + event.stopPropagation(); + + if (event.keyCode === ESCAPE) { + return EmojiPicker.close(); + } + const value = event.target.value.trim(); const cst = instance.currentSearchTerm; if (value === cst.get()) { diff --git a/app/emoji/client/lib/EmojiPicker.js b/app/emoji/client/lib/EmojiPicker.js index c46226adc6d0..98e7038d800f 100644 --- a/app/emoji/client/lib/EmojiPicker.js +++ b/app/emoji/client/lib/EmojiPicker.js @@ -113,6 +113,7 @@ export const EmojiPicker = { close() { $('.emoji-picker').removeClass('show'); this.opened = false; + this.source.focus(); }, pickEmoji(emoji) { this.pickCallback(emoji); diff --git a/app/ui-message/client/messageBox/messageBox.js b/app/ui-message/client/messageBox/messageBox.js index f4fc1289927b..53c910203871 100644 --- a/app/ui-message/client/messageBox/messageBox.js +++ b/app/ui-message/client/messageBox/messageBox.js @@ -40,7 +40,6 @@ import './messageBoxReadOnly'; Template.messageBox.onCreated(function() { this.state = new ReactiveDict(); - EmojiPicker.init(); this.popupConfig = new ReactiveVar(null); this.replyMessageData = new ReactiveVar(); this.isMicrophoneDenied = new ReactiveVar(true); @@ -111,6 +110,7 @@ Template.messageBox.onCreated(function() { Template.messageBox.onRendered(function() { const $input = $(this.find('.js-input-message')); + this.input = $input[0]; $input.on('dataChange', () => { const messages = $input.data('reply') || []; this.replyMessageData.set(messages); @@ -327,7 +327,7 @@ Template.messageBox.events({ return; } - EmojiPicker.open(event.currentTarget, (emoji) => { + EmojiPicker.open(instance.input, (emoji) => { const emojiValue = `:${ emoji }: `; const { input } = instance; From bbb76781fd3d44c7376303a35eb6befbb6b3bc06 Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 17 Oct 2019 11:33:07 -0300 Subject: [PATCH 4/4] Fix wrong variable name --- app/ui-message/client/messageBox/messageBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui-message/client/messageBox/messageBox.js b/app/ui-message/client/messageBox/messageBox.js index 53c910203871..1e1705b7004b 100644 --- a/app/ui-message/client/messageBox/messageBox.js +++ b/app/ui-message/client/messageBox/messageBox.js @@ -110,7 +110,7 @@ Template.messageBox.onCreated(function() { Template.messageBox.onRendered(function() { const $input = $(this.find('.js-input-message')); - this.input = $input[0]; + this.source = $input[0]; $input.on('dataChange', () => { const messages = $input.data('reply') || []; this.replyMessageData.set(messages); @@ -327,7 +327,7 @@ Template.messageBox.events({ return; } - EmojiPicker.open(instance.input, (emoji) => { + EmojiPicker.open(instance.source, (emoji) => { const emojiValue = `:${ emoji }: `; const { input } = instance;