mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #24013] perf: defer RichTextInput formatting toolbar invalidation to rAF #43106
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/24013
Author: @jmleksan
Created: 4/22/2026
Status: 🔄 Open
Base:
dev← Head:perf/rich-text-input-toolbar-raf📝 Commits (1)
259b54aperf: defer RichTextInput formatting toolbar invalidation to rAF📊 Changes
1 file changed (+25 additions, -2 deletions)
View changed files
📝
src/lib/components/common/RichTextInput.svelte(+25 -2)📄 Description
Before submitting, make sure you've checked the following:
devbranch. PRs targetingmainwill be immediately closed.devto ensure no unrelated commits (e.g. frommain) are included. Push updates to the existing PR branch instead of closing and reopening.Changelog Entry
Description
RichTextInputpreviously assignededitor = editoron every TipTap transaction soFormattingButtons(bubble + floating toolbars) refreshededitor.isActive(...). That reconciles Svelte UI in the same turn as ProseMirror’s editor update. This PR defers that assignment withrequestAnimationFramewhenrichText && showFormattingToolbar, and cancels the pending frame inonDestroy.onChange,getHTML, and markdown export remain synchronous so bound prompt state does not lag before send.Changed
requestAnimationFrameto reduce interleaved layout work with the TipTap/ProseMirror update cycle.Additional Information
onChangebehavior are unchanged.src/lib/components/common/RichTextInput.svelteonly.Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.