Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 195520b

Browse files
Merge pull request #1156 from deckgo/fix/inline-editor-ios
fix: inline editor ios and mobile overflow
2 parents bdcba57 + c467534 commit 195520b

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
:host {
22
padding: 4px 0;
3-
4-
deckgo-color {
5-
pointer-events: all;
6-
}
73
}
84

95
:host(.deckgo-tools-mobile) {
106
max-width: calc(100% - 54px);
11-
--deckgo-overflow: scroll;
12-
--deckgo-flex-wrap: nowrap;
13-
--deckgo-color-width: 100%;
7+
--deckgo-color-flex-wrap: nowrap;
8+
--deckgo-color-width: fit-content;
9+
pointer-events: all;
10+
overflow: scroll;
1411
}

webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ div.deckgo-tools {
7070

7171
&.deckgo-tools-sticky,
7272
&.deckgo-tools-mobile.deckgo-tools-sticky {
73-
position: absolute;
73+
position: fixed;
7474

7575
/**
7676
* @prop --deckgo-inline-editor-sticky-bottom: The bottom attribute of the sticky toolbar

webcomponents/inline-editor/src/components/inline-editor/deckdeckgo-inline-editor.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -489,23 +489,6 @@ export class DeckdeckgoInlineEditor {
489489
}
490490

491491
await this.setStickyPositionIOS();
492-
493-
if (window) {
494-
window.addEventListener(
495-
'scroll',
496-
async () => {
497-
await this.setStickyPositionIOS();
498-
},
499-
{passive: true}
500-
);
501-
window.addEventListener(
502-
'resize',
503-
async () => {
504-
await this.reset(true, true);
505-
},
506-
{passive: true}
507-
);
508-
}
509492
});
510493
}
511494

@@ -815,7 +798,7 @@ export class DeckdeckgoInlineEditor {
815798

816799
await execCommand(this.selection, $event.detail, this.containers);
817800

818-
if ($event.detail.cmd === 'list') {
801+
if ($event.detail.cmd === 'list' || isIOS()) {
819802
await this.reset(true);
820803
}
821804

0 commit comments

Comments
 (0)