From 494cc44fc68e2f915728032cab236b22b6ea1c23 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Tue, 5 Jan 2021 11:35:51 +0400 Subject: [PATCH 1/3] Fix text selection for menu component --- src/styles/menu.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/styles/menu.scss b/src/styles/menu.scss index 7054369f..a303b4bc 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -37,6 +37,7 @@ $margin-bottom-menu-item: 8px; } .el-menu-item { align-items: center; + user-select: none; &:not(.is-disabled):hover, &.is-active { background-color: var(--s-menu-color-hover) !important; @@ -60,6 +61,7 @@ $margin-bottom-menu-item: 8px; margin-bottom: $margin-bottom-menu-item; } .el-submenu { + user-select: none; .el-menu-item { min-width: 0; } From 587e8337f5dfc9f9adfa66a452eb1ee29df20181 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Tue, 5 Jan 2021 11:36:09 +0400 Subject: [PATCH 2/3] Add check for icons font loading state --- package.json | 2 +- src/components/Icon/SIcon.vue | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c2ae010b..a00681b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@soramitsu/soramitsu-js-ui", - "version": "0.6.9", + "version": "0.7.0", "private": false, "publishConfig": { "registry": "https://nexus.iroha.tech/repository/npm-soramitsu-private/" diff --git a/src/components/Icon/SIcon.vue b/src/components/Icon/SIcon.vue index 89244937..35aeaed9 100644 --- a/src/components/Icon/SIcon.vue +++ b/src/components/Icon/SIcon.vue @@ -32,6 +32,10 @@ export default class SIcon extends Vue { if (this.name.startsWith('el-icon')) { return this.name } + // Check loading state of icons font + if (!((document || {}) as any).fonts.check('1em soramitsu-icons')) { + return '' + } if (!(Object.values(Icons) as Array).includes(this.name)) { console.warn(`'${this.name}' was not found`) return '' From 4219df0164b7949daa7f0a1951229e7c0d678339 Mon Sep 17 00:00:00 2001 From: Stefan Popov Date: Tue, 5 Jan 2021 11:54:14 +0400 Subject: [PATCH 3/3] Update menu.scss --- src/styles/menu.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/styles/menu.scss b/src/styles/menu.scss index a303b4bc..0dc20b28 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -38,6 +38,7 @@ $margin-bottom-menu-item: 8px; .el-menu-item { align-items: center; user-select: none; + -webkit-user-select: none; &:not(.is-disabled):hover, &.is-active { background-color: var(--s-menu-color-hover) !important; @@ -62,6 +63,7 @@ $margin-bottom-menu-item: 8px; } .el-submenu { user-select: none; + -webkit-user-select: none; .el-menu-item { min-width: 0; }