zulip/web
ubaidrmn 1a97fecdb8 compose: Fix preview not being updated when compose textarea is updated.
In preview mode, background updates to the compose box don’t refresh
the preview. For example, canceling an ongoing file upload after
activating preview mode still displays "uploading."

This commit extracts the preview rendering logic from the
show_preview_area function into a new function, `render_preview_area`,
and calls it on the compose textarea’s change event to ensure the
preview updates whenever the textarea is modified.

However, this introduces a race condition where the latest request is
not always reflected in the preview. To resolve this, we introduce a
state variable, `preview_render_count`, which is used to ensure only
the latest preview update is applied.

Fixes #33589.
2025-03-03 17:38:27 -08:00
..
e2e-tests eslint: Fix unicorn/consistent-assert. 2025-02-26 16:20:47 -08:00
generated
html 5xx: Remove duplicate error_page class applied on page. 2024-07-03 13:35:12 -07:00
images zulip-icons: Rename to *.cjs. 2024-11-13 09:18:56 -08:00
server katex_server: Fix import/no-named-as-default. 2024-09-25 15:41:01 -07:00
shared left_sidebar: Change icon. 2025-02-26 13:13:51 -08:00
src compose: Fix preview not being updated when compose textarea is updated. 2025-03-03 17:38:27 -08:00
styles buddy_list: Use different spacing for avatar and non-avatar text. 2025-03-03 17:33:48 -08:00
templates presence_data: Fetch presence data when user card is opened. 2025-03-03 16:11:30 -08:00
tests typeahead_helper: Place bots under group matches. 2025-03-03 16:48:06 -08:00
third message_link: Add support for empty string topic in syntax. 2025-01-31 14:23:15 -08:00
.browserslistrc
.gitignore emoji: Convert spritesheets to webp. 2024-09-11 09:03:47 -07:00
babel.config.js dependencies: Upgrade JavaScript dependencies. 2025-02-26 16:20:47 -08:00
debug-require-webpack-plugin.ts debug-require: Rename to *.cjs. 2024-11-13 09:18:56 -08:00
debug-require.cjs debug-require: Rename to *.cjs. 2024-11-13 09:18:56 -08:00
postcss.config.js container_queries: Establish new breakpoints. 2025-02-26 15:52:24 -08:00
webpack.assets.json integrations: Convert module to TypeScript. 2024-12-01 19:33:16 -08:00
webpack.config.ts templates: Convert module to TypeScript. 2024-11-27 13:52:21 -08:00
webpack.dev-assets.json showroom: Standardize "showroom" name for UI components testing pages. 2025-01-13 17:46:15 -08:00