zulip/web
Hardik Dharmani c12d249627 message_list_hover: Fix hover edit button visibility on new messages.
This commit resolves an issue where the edit button was not visible
during message hover for new messages. The problem occurred when a
message was sent after the hover event, resulting in the hovered
message being a local copy with the `locally_echoed` attribute set
to true. This caused the `is_message_editable_ignoring_permissions`
function to return false, subsequently causing `is_content_editable`
to return false as well. As a result, the `is_content_editable`
argument was false, leading to the edit button not being displayed.

The issue was caused due `$current_message_hover` being set to the
locally echoed version of `$message_row`. When the message was
successfully sent and the message was rerendered, the `message_hover`
function was called again on the properly sent message row.

However, the conditional check `($current_message_hover &&
rows.id($current_message_hover) === id)` returned true because
`$current_message_hover`, set to the locally echoed version, had the
same ID as the actual `$message_row`. Consequently, this condition
returned true at the start of the `message_hover` function,
preventing further execution of message_hover function and,
consequently, the updating of hover buttons.

To address this, an `else if` condition was introduced to check if
the message is locally echoed. If true, the function is terminated
to prevent `$current_message_hover` from being set to the locally
echoed version of `$message_row` until the message is sent correctly.

Once the message is sent correctly, the `message_hover` function is
executed again, setting `$current_message_row` to the properly sent
version of `$message_row`, and resulting in updating of hover buttons.

Fixes #25312
2023-09-28 18:07:26 -07:00
..
e2e-tests gear_menu: Remove href="#logout" from logout button. 2023-09-27 18:01:47 -07:00
generated
html
images styles: Remove Firefox override for dropdown appearance. 2023-07-24 13:10:03 -07:00
shared icons: Remove unused move and source icons. 2023-09-15 13:17:22 -07:00
src message_list_hover: Fix hover edit button visibility on new messages. 2023-09-28 18:07:26 -07:00
styles compose_banners: Explicitly target banner content, child p. 2023-09-28 17:06:49 -07:00
templates todo_widget: Use colon `:` as task and description display separator. 2023-09-28 16:03:03 -07:00
tests typeahead: Allow automatic insertion/removal of bulleting/numbering. 2023-09-28 15:05:34 -07:00
third bootstrap: Delete button JavaScript. 2023-09-27 11:13:45 -07:00
.browserslistrc
.gitignore
babel.config.js dependencies: Upgrade JavaScript dependencies. 2023-09-15 14:09:49 -07:00
debug-require-webpack-plugin.ts
debug-require.js
postcss.config.js
webpack.assets.json stats: Add stats page_params to `webpack.assets.json`. 2023-08-24 10:43:38 -07:00
webpack.config.ts dependencies: Upgrade JavaScript dependencies. 2023-06-05 21:51:26 -07:00
webpack.dev-assets.json