If the popover reference is in an overlay, the below check:
```js
elements_at_reference_position.some(
(element) =>
element.id === "navbar-fixed-container" ||
element.id === "compose-content" ||
element.classList.contains("sticky_header"),
)
```
would make the popover not appear if the reference was above them.
To make things simpler for us to check, we only handle popover
references inside message list which we know for sure will
always be below the elements checked above in stacking context.
Hiding popovers for other view is done good enough by
`data-reference-hidden` check that we don't need to manually
handle them.
Since `#compose` occupies full width of the window, it is a
part of `elements_at_reference_position` if the reference is
under it.
Since `#compose-content` only occupies the part of window where
compose box is actually visible, we use it decide if the
popover should be hidden.
Before this change, we'd try to close the sidebar before
closing text fields. This means if the user sidebar was
open with a text search in progress, pressing Escape
would close the full sidebar instead of closing search.
This change deprioritizes closing the sidebar, in favor
of closing input fields like search.
This also helps with #26717, because the sidebar seems to
be marked as open even when it's not an overlay, which
means pressing Escape will first "close" it (no visual
changes), before a second Escape would trigger closing
the search field. Ideally we differentiate between
situations where we are showing the sidebar as an
overlay and when we aren't, but that might be a more
involved change.
Fixes part of #27491
We don't immediatley remove the input box, because there's
no existing UI for reopening the input box. (The input box
is always visible when the more topics view is visible.)
This commit makes the change of blurring and clearing the
input, instead of only blurring.
Fixes#27508
Show sidebar icon when sidebar popover is visible so that
it tells users for which row popover is visible and also helps
tippy track when the reference of the popover so that it
can apply [data-reference-hidden] property appropriately.
If the selection copied, is entirely within a single element, like text
within a heading (like `h1`) we discard this outermost element and only
convert the inner HTML to markdown.
However, we retain `pre` so a code block within it stays as is and does
not change into inline code, losing all its linebreaks.
Previously, when uploading of a file fails, the same file
couldn't be re-uploaded again without re opening the
compose box. This is because, the default behaviour of
uppy is that it won't allow re-upload of same files.
This could be fixed by removing the uploaded file when
the upload-error event is invoked for it.
Fixes#27495
ResizeObserver isn't supported for Safari iOS versions we support.
We support iOS Safari ≥ 12.2 but ResizeObserver support requires
iOS Safari >=13.4. So if they're on iOS Safari >= 12.2 and < 13.4,
it crashes.
Tippyjs is equipped to handle reference element moving from
its initial position so that the popover moves / changes
along with the reference / window size.
When the focus is inside a dropdown, we do not consider any key strokes
to be hotkeys. This prevents the user from accidentally triggering an
action while trying to type into the dropdown search / filter.
This aims to fix the bug where on pressing a character key that is also
a hotkey, the hotkey action would be triggered, even if the focus was
inside the stream picker dropdown.
Fixes#27492.
The muted notice string "Muted streams don't show up in "All messages"
or generate notifications unless you are mentioned." doesn't properly
explain the behavior of muted streams.
A user can still get notifications for muted streams if they follow a
topic in the stream. This is because the followed topics global
settings will override the stream notifications settings.
Fixes#27274.
In this commit, we move the "Mute stream" option to the top of the
notification settings, since the action of muting a stream works
in conjunction with the other notification settings.
We also rename `is_notification_setting` to
`has_global_notification_setting` which better defines the purpose of
the function and now use `is_notification_setting` only to check which
options we need to show under the "Notification settings" section.
This allows us to accommodate the "Mute stream" option under the
"Notification settings" section without affecting the functionality of
the other notification options.
Fixes part of #27274.