Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

ACF Blocks V3 - Saving in preview mode doesn't work reliably when you type fast within the input fields or manipulate text via keyboard shortcuts

未关闭
#982 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
php, wordpress
领域
content, frontend

调研方向

使用包含 wysiwyg 字段且处于预览模式的 ACF Blocks V3 区块,通过快速输入并使用 alt+backspace 或 cmd+backspace 来复现该问题。将输入内容与实时预览和已保存的文章进行比较;快速编辑和键盘快捷键保持同步,并且保存后保留最新输入的内容,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

Added a video of the bug below.

I am using the latest version of ACF Blocks V3 with version ACF PRO 6.6.1.

When you type within an input field (e.g. wysiwyg) in preview mode, the live preview is lagging behind when you type fast or use a keyboard shortcuts like copy & paste, alt+backspace or cmd+backspace.

The live preview can't keep up.

When the live preview is out of sync with what you just typed, it will wrongly save what is inside the preview mode, inside of the up to date content of your input field.

I've added a video of the bug below.

To Reproduce
Steps to reproduce the behavior:

  1. Create an ACF block with a wysiwyg text field
  2. Use the block in preview mode
  3. Quickly type a sentence or a couple of words, quickly do a deletion of some words via alt+backspace or cmd+backspace
  4. You will see the text in preview being out of sync with the text in the wysiwyg area
  5. When you save the page, only the text from the preview will be saved. Not what you actually wrote in the wysiwyg.

Maybe the bug is also occurs on other input fields such as plain text or textarea, but I haven't tested these yet.

Expected behavior

The preview mode should be an accurate representation of what you type. Even if you type fast, or use keyboard shortcuts to manipulate text. When you're done typing, it should do a refresh after a couple of ms.

When saving an edited post, the saved post should always be what you just entered in a text or input field.
Otherwise editors may save posts or pages, and end up with broken text when they view the website.

Screenshots or Video

Demo of the bug:

https://github.com/user-attachments/assets/f52e9c74-9c04-4dc0-9e65-9d8ab337abc6

Version Information:

  • WordPress 6.8.3
  • PHP 8.2.27
  • ACF PRO 6.6.1
  • Browser (Chromium Engine Version 141.0.7390.108)
主要语言
PHP
星标
946
派生
197
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AdvancedCustomFields/acf 的其他 Issue

查看 AdvancedCustomFields/acf 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。