inline tools click on mobile devices improved

This commit is contained in:
Peter Savchenko 2022-11-29 10:30:25 +04:00
parent 88828d97b3
commit 62fd293d04
No known key found for this signature in database
GPG key ID: E68306B1AB0F727C
4 changed files with 9 additions and 5 deletions

View file

@ -15,6 +15,7 @@
- `Fix` — Pasting from Microsoft Word to Chrome (Mac OS) fixed. Now if there are no image-tools connected, regular text content will be pasted.
- `Fix` — Workaround for the HTMLJanitor bug with Tables (https://github.com/guardian/html-janitor/issues/3) added
- `Fix` — Toolbox shortcuts appearance and execution fixed [#2112](https://github.com/codex-team/editor.js/issues/2112)
- `Fix` — Inline Tools click handling on mobile devices improved
- `Improvement`*Tools API*`pasteConfig().tags` now support sanitizing configuration. It allows you to leave some explicitly specified attributes for pasted content.
- `Improvement`*CodeStyle* — [CodeX ESLint Config](https://github.com/codex-team/eslint-config) has bee updated. All ESLint/Spelling issues resolved
- `Improvement`*ToolsAPI* — The `icon` property of the `toolbox` getter became optional.

View file

@ -68,7 +68,8 @@ export default class InlineToolbar extends Module<InlineToolbarNodes> {
/**
* Margin above/below the Toolbar
*/
private readonly toolbarVerticalMargin: number = 5;
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
private readonly toolbarVerticalMargin: number = _.isMobileScreen() ? 20 : 6;
/**
* TODO: Get rid of this

View file

@ -1,6 +1,8 @@
.ce-inline-toolbar {
--y-offset: 8px;
@apply --overlay-pane;
transform: translateX(-50%) translateY(8px) scale(0.9);
transform: translateX(-50%) translateY(8px) scale(0.94);
opacity: 0;
visibility: hidden;
transition: transform 150ms ease, opacity 250ms ease;
@ -16,7 +18,7 @@
}
&--left-oriented {
transform: translateX(-23px) translateY(8px) scale(0.9);
transform: translateX(-23px) translateY(8px) scale(0.94);
}
&--left-oriented&--showed {
@ -24,7 +26,7 @@
}
&--right-oriented {
transform: translateX(-100%) translateY(8px) scale(0.9);
transform: translateX(-100%) translateY(8px) scale(0.94);
margin-left: 23px;
}

View file

@ -59,7 +59,7 @@
* Size of svg icons got from the CodeX Icons pack
*/
--icon-size: 20px;
--icon-size--mobile: 30px;
--icon-size--mobile: 28px;
/**