fix(feedback): 反馈弹窗禁止背景点击关闭,只能用 X 按钮
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

之前点击外部遮罩会关闭弹窗,用户填到一半误触会丢失全部已输入内容。
去掉 backdrop 的 onClick={close},只保留右上角 X 按钮关闭路径。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-30 14:08:22 +08:00
parent 20ebb16e08
commit 90b1266fe5

View File

@@ -241,7 +241,7 @@ export default function FeedbackFab({ module: moduleProp }: Props = {}) {
animate={{ opacity: 1 }} animate={{ opacity: 1 }}
exit={{ opacity: 0 }} exit={{ opacity: 0 }}
className="fixed inset-0 z-[90] bg-slate-900/40 backdrop-blur-sm flex items-end md:items-center justify-center" className="fixed inset-0 z-[90] bg-slate-900/40 backdrop-blur-sm flex items-end md:items-center justify-center"
onClick={close} // 不允许点击背景关闭:避免用户输入到一半误触遮罩丢失内容
> >
<motion.div <motion.div
initial={{ y: '100%', opacity: 0 }} initial={{ y: '100%', opacity: 0 }}