Skip to content

[6.x] Fix Bard arrow keys/undo#14467

Merged
jasonvarga merged 2 commits into6.xfrom
fix--bard-arrow-keys
Apr 9, 2026
Merged

[6.x] Fix Bard arrow keys/undo#14467
jasonvarga merged 2 commits into6.xfrom
fix--bard-arrow-keys

Conversation

@jackmcdade
Copy link
Copy Markdown
Member

SetPicker was binding global arrow/enter handlers but never cleaned them up if the component was unmounted while open (which happens in Bard after inserting a set).

Closes #13806.

SetPicker was binding global arrow/enter handlers but never cleaned them up if the component was unmounted while open (which happens in Bard after inserting a set).

Closes #13806.
@jackmcdade jackmcdade requested a review from duncanmcclean April 9, 2026 13:56
() => data_get(this.publishContainer.values.value, this.fieldPathPrefix),
(values) => {
if (! values) return;
if (JSON.stringify(values) === JSON.stringify(this.node.attrs.values)) return;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this have to do with key bindings?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing directly — it’s an optional guard to skip a no-op updateAttributes call, preventing redundant ProseMirror transactions when set values didn’t actually change. Apparently fewer redundant transactions can reduce weird editor side effects like the undo/history churn.

We can remove it and probably be fine.

@jasonvarga jasonvarga merged commit 41269e9 into 6.x Apr 9, 2026
17 checks passed
@jasonvarga jasonvarga deleted the fix--bard-arrow-keys branch April 9, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arrow keys / Undo not working in Bard Fields

2 participants