From 88d95f5b7acd6db61da849663946aeba43e6e63a Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Sun, 9 May 2021 09:23:30 +0200 Subject: [PATCH 1/2] fix: ios selection --- .../deckdeckgo-inline-editor.scss | 2 +- .../deckdeckgo-inline-editor.tsx | 19 +------------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.scss b/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.scss index 4c4f8c3eb..67682da1d 100644 --- a/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.scss +++ b/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.scss @@ -70,7 +70,7 @@ div.deckgo-tools { &.deckgo-tools-sticky, &.deckgo-tools-mobile.deckgo-tools-sticky { - position: absolute; + position: fixed; /** * @prop --deckgo-inline-editor-sticky-bottom: The bottom attribute of the sticky toolbar diff --git a/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx b/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx index 2f2a39c4a..c4cd91b33 100644 --- a/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx +++ b/webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx @@ -489,23 +489,6 @@ export class DeckdeckgoInlineEditor { } await this.setStickyPositionIOS(); - - if (window) { - window.addEventListener( - 'scroll', - async () => { - await this.setStickyPositionIOS(); - }, - {passive: true} - ); - window.addEventListener( - 'resize', - async () => { - await this.reset(true, true); - }, - {passive: true} - ); - } }); } @@ -815,7 +798,7 @@ export class DeckdeckgoInlineEditor { await execCommand(this.selection, $event.detail, this.containers); - if ($event.detail.cmd === 'list') { + if ($event.detail.cmd === 'list' || isIOS()) { await this.reset(true); } From c4675341e77b86731d6afa55b497564f064afd0d Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Sun, 9 May 2021 10:06:45 +0200 Subject: [PATCH 2/2] fix: overflow mobile --- .../actions/color-actions/color-actions.scss | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/webcomponents/inline-editor/src/components/actions/color-actions/color-actions.scss b/webcomponents/inline-editor/src/components/actions/color-actions/color-actions.scss index abf52232a..fa04c8d2c 100644 --- a/webcomponents/inline-editor/src/components/actions/color-actions/color-actions.scss +++ b/webcomponents/inline-editor/src/components/actions/color-actions/color-actions.scss @@ -1,14 +1,11 @@ :host { padding: 4px 0; - - deckgo-color { - pointer-events: all; - } } :host(.deckgo-tools-mobile) { max-width: calc(100% - 54px); - --deckgo-overflow: scroll; - --deckgo-flex-wrap: nowrap; - --deckgo-color-width: 100%; + --deckgo-color-flex-wrap: nowrap; + --deckgo-color-width: fit-content; + pointer-events: all; + overflow: scroll; }