修复长按消息气泡弹出自定义菜单时,浏览器/系统原生右键菜单跟着一起弹出的问题

chat-message.jsx 新增 suppressNativeContextMenu,在气泡上监听 contextmenu 事件并 preventDefault,
避免长按(或桌面端右键/触屏模拟长按)触发的原生上下文菜单和应用自己的长按菜单重叠显示。
css/base.css 给 .bubble 补了 -webkit-touch-callout:none,同时覆盖 iOS Safari 那条独立于
contextmenu 事件之外的长按呼出菜单(复制/查询/分享...),不影响 user-select,桌面端正常的
点击拖拽选字复制不受影响。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-07 19:50:06 +08:00
co-authored by Claude Sonnet 5
parent 4ce666042e
commit 48baeceaa8
5 changed files with 23 additions and 3 deletions
+5
View File
@@ -4586,6 +4586,11 @@ video {
transition: ease-out background-color 0.5s;
transition-delay: 0.3s;
filter: drop-shadow(0.5px 0.5px 0.7px var(--clr-shadow-bubble-drop));
/* iOS Safari's press-and-hold callout (Copy/Look Up/Share...) is a separate mechanism from the
`contextmenu` DOM event suppressed in chat-message.jsx -- needs its own opt-out so it doesn't
stack with our own long-press menu. Doesn't touch user-select, so normal click-drag text
selection on desktop is untouched. */
-webkit-touch-callout: none;
}
.chat-box li.single {
+1 -1
View File
File diff suppressed because one or more lines are too long