Skip to content

Commit 93ceb87

Browse files
committed
🐛 Unable to set inline element on HarmonyOS #14687
1 parent 22246b5 commit 93ceb87

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/mobile/util/keyboardToolbar.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {listIndent, listOutdent} from "../../protyle/wysiwyg/list";
22
import {
33
hasClosestBlock,
44
hasClosestByAttribute,
5-
hasClosestByClassName, hasClosestByTag,
5+
hasClosestByClassName,
6+
hasClosestByTag,
67
} from "../../protyle/util/hasClosest";
78
import {moveToDown, moveToUp} from "../../protyle/wysiwyg/move";
89
import {Constants} from "../../constants";
@@ -11,7 +12,7 @@ import {getCurrentEditor} from "../editor";
1112
import {fontEvent, getFontNodeElements} from "../../protyle/toolbar/Font";
1213
import {hideElements} from "../../protyle/ui/hideElements";
1314
import {softEnter} from "../../protyle/wysiwyg/enter";
14-
import {isInAndroid} from "../../protyle/util/compatibility";
15+
import {isInAndroid, isInHarmony} from "../../protyle/util/compatibility";
1516

1617
let renderKeyboardToolbarTimeout: number;
1718
let showUtil = false;
@@ -519,7 +520,7 @@ export const initKeyboardToolbar = () => {
519520
<button class="keyboard__action" data-type="done"><svg style="width: 36px"><use xlink:href="#iconKeyboardHide"></use></svg></button>
520521
</div>
521522
<div class="keyboard__util"></div>`;
522-
toolbarElement.addEventListener(isInAndroid() ? "touchstart" : "click", (event) => {
523+
toolbarElement.addEventListener(isInAndroid() || isInHarmony() ? "touchstart" : "click", (event) => {
523524
const protyle = getCurrentEditor()?.protyle;
524525
const target = event.target as HTMLElement;
525526
const slashBtnElement = hasClosestByClassName(event.target as HTMLElement, "keyboard__slash-item");

0 commit comments

Comments
 (0)