Commit Graph

6 Commits

Author SHA1 Message Date
tyler ed1431f1bd gear_menu: Rename tooltip to reflect name change from 'Menu' to 'Main menu'. 2023-06-23 14:42:34 -07:00
Anders Kaseorg 3ca131743b CVE-2023-33186: Fix topic tooltip cross-site scripting vulnerability.
Commit 903dbda79b (#25370) introduced a
cross-site scripting vulnerability in the tooltips for the stream and
topic in the recipient bar.  An attacker who can send messages could
maliciously craft a topic for the message, such that a victim who
hovers the tooltip for that topic in their message feed triggers
execution of JavaScript code controlled by the attacker.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-29 16:35:49 -07:00
Daniil Fadeev f2e627ba51 drafts: Move code handling keyboard navigation to a separate module.
The keyboard navigation that used to only work in drafts can now be
reused. This commit has moved the related functions to a separate
module.
2023-05-15 14:46:21 -07:00
Hardik Dharmani 3a358a9a11 tooltips: Shift all tooltip templates to tooltip_templates.hbs.
Refactored all tooltip templates with static content to be in
tooltip_templates.hbs to avoid duplicate IDs and DOM element.

Fixes #25324
2023-05-09 11:10:58 -07:00
Hardik Dharmani 03cfb3d9fe tooltips: Add `S` hotkey hint to `narrow-to` tippy tooltips.
Added hotkey hint to Narrow to stream/topic/DM tooltips by creating
new tippy for `tippy-narrow-tooltip` with LONG_HOVER_DELAY which
appends `S` hotkey to the existing tippy content set by
data-tippy-content attribute on the element.

Using this approach instead of a <template> with
data-tooltip-template-id avoids issues with context, where
{display_recipient}/{topic}/{display_reply_to} inside <template>
would always show the same stream/topic name regardless of the
actual stream/topic being hovered over.
2023-05-02 13:50:46 -07:00
Tim Abbott 496b403fcf tooltips: Add new central tooltip template store.
We should migrate all the static content tooltip templates to this
file to avoid duplicate DOM elements.
2023-04-27 18:12:32 -07:00