Skip to content

Commit 629a0f8

Browse files
authored
fix: resolve editor styling issues in Safari browser (#7328)
#### What type of PR is this? /kind bug /area editor /area ui /milestone 2.20.x #### What this PR does / why we need it: Replace `drop-shadow-*` with `shadow-*` to resolve editor styling issues in Safari brower. before: <img width="399" alt="image" src="https://github.com/user-attachments/assets/c9305e09-9f1b-4879-b532-a09b931ca178" /> <img width="270" alt="image" src="https://github.com/user-attachments/assets/d77cf742-c374-4b2d-b5a9-86f454103039" /> after: <img width="411" alt="image" src="https://github.com/user-attachments/assets/47ab2cce-b511-4ece-ac21-c8668ef89e75" /> <img width="250" alt="image" src="https://github.com/user-attachments/assets/70008a8f-2f36-44e7-a40a-a260476342f0" /> #### Which issue(s) this PR fixes: None #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? ```release-note 修复编辑器在 Safari 浏览器中关于浮动工具栏和命令列表的样式问题。 ``` <!-- Fuuuuuuuuuuuuuuuuck Safari -->
1 parent fb7a097 commit 629a0f8

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Diff for: ui/packages/editor/src/components/EditorBubbleMenu.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const shouldShow = (
7171
:default-animation="bubbleMenu.defaultAnimation"
7272
>
7373
<div
74-
class="bubble-menu bg-white flex items-center rounded-md p-1 border drop-shadow space-x-1"
74+
class="bubble-menu bg-white flex items-center rounded-md p-1 border shadow space-x-1"
7575
>
7676
<template v-if="bubbleMenu.items">
7777
<template

Diff for: ui/packages/editor/src/components/EditorHeader.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function getToolboxItemsFromExtensions() {
5959
</script>
6060
<template>
6161
<div
62-
class="editor-header py-1 space-x-1 px-1 overflow-auto border-b drop-shadow-sm bg-white text-center"
62+
class="editor-header py-1 space-x-1 px-1 overflow-auto border-b shadow-sm bg-white text-center"
6363
>
6464
<div class="h-full inline-flex items-center">
6565
<VMenu>
@@ -68,7 +68,7 @@ function getToolboxItemsFromExtensions() {
6868
</button>
6969
<template #popper>
7070
<div
71-
class="relative rounded-md bg-white overflow-hidden drop-shadow w-56 p-1 max-h-96 overflow-y-auto space-y-1.5"
71+
class="relative rounded-md bg-white overflow-hidden shadow w-56 p-1 max-h-96 overflow-y-auto space-y-1.5"
7272
>
7373
<component
7474
:is="toolboxItem.component"
@@ -106,7 +106,7 @@ function getToolboxItemsFromExtensions() {
106106
/>
107107
<template #popper>
108108
<div
109-
class="relative rounded-md bg-white overflow-hidden drop-shadow w-56 p-1 max-h-96 overflow-y-auto space-y-1.5"
109+
class="relative rounded-md bg-white overflow-hidden shadow w-56 p-1 max-h-96 overflow-y-auto space-y-1.5"
110110
>
111111
<component
112112
v-bind="child.props"

Diff for: ui/packages/editor/src/components/bubble/BubbleItem.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const handleBubbleItemClick = (editor: Editor) => {
6262
</button>
6363
<template #popper>
6464
<div
65-
class="relative rounded-md bg-white overflow-hidden drop-shadow w-96 p-1 max-h-72 overflow-y-auto"
65+
class="relative rounded-md bg-white overflow-hidden shadow w-96 p-1 max-h-72 overflow-y-auto"
6666
>
6767
<KeepAlive>
6868
<component :is="componentRef" v-bind="props"></component>

Diff for: ui/packages/editor/src/extensions/commands-menu/CommandsView.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ defineExpose({
114114
rounded-md
115115
bg-white
116116
overflow-hidden
117-
drop-shadow
117+
shadow
118118
w-52
119119
p-1
120120
max-h-72

Diff for: ui/packages/editor/src/extensions/link/LinkBubbleButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const handleLinkBubbleButton = () => {
9393

9494
<template #popper>
9595
<div
96-
class="relative rounded-md bg-white overflow-hidden drop-shadow w-96 p-1 max-h-72 overflow-y-auto"
96+
class="relative rounded-md bg-white overflow-hidden shadow w-96 p-1 max-h-72 overflow-y-auto"
9797
>
9898
<input
9999
v-model.lazy="href"

Diff for: ui/packages/editor/src/styles/base.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797

9898
.v-popper--theme-editor-block-dropdown {
9999
.v-popper__inner {
100-
@apply bg-white drop-shadow-md rounded-md;
100+
@apply bg-white shadow-md rounded-md;
101101
}
102102

103103
.v-popper__arrow-container {

0 commit comments

Comments
 (0)