Since the keyup event for keys including shift triggers the typeahead,
shift tabbing into the topic recipient field would show the typeahead
momentarily, which is distracting.
As we need typeahead to trigger on shift for certain use cases in the
compose box, but not in the topic recipient field, we now do not trigger
typeahead on shift keyup events in the topic recipient field.
Fixes: #24152.
Though the correct mapping for Alt in Mac is Option, we had so far been
mapping it to Command, since for the 2 pre-existing shortcuts that used
Alt, Command was the only key that worked on Mac. However, these are
exceptions.
Now we map Alt to Option, and handle the 2 exceptions separately, using
data attributes on those shortcut elements.
This is a prep commit for introducing a hotkey that uses Alt / Option.
The code responsible for switching from edit mode to preview mode from
`compose_setup.js` is now extracted into a new function in `compose.js`,
to facilitate reuse.
This is a prep commit for introducing a hotkey to toggle between edit
and preview mode for the compose box.
There is no problem in behavior of browser back button if we open
the group settings overlay using "#groups/your", "#groups/all" or
"#groups/new" url hash, but someone can directly go to a link with
"#groups" and in this case we want to fix the browser back button.
This commit replaces "#groups" entry with "#groups/your" which is the
default section opened, such that pressing back when on "#groups/your"
does not go to "#groups", which will then a form a cycle and instead
go back actually.
This commit fixes the bug in browser back button behavior when
opening the groups overlay from gear menu. The bug was caused
due to browser history containing both "#groups" and "#groups/your"
entries, which essentially resulted in a "#groups/your" -> "#groups"
-> "#groups/your" cycle and thus nothing happend on clicking
browser back button.
The case for a user manually typing "#groups" url would be handled
in next commit.
This commit fixes the behaviour of message formatting overlay in
help menu not opening due to assertion error in rendered markdown
after changes from #28418.
This will be applied to both the overall installation activity chart
as well as the associated remote, client, realm and user views.
Co-authored-by: Karl Stolley <karl@zulip.com>
There is no need to log if the stream edit UI is not opened
when an event for updating subscribers list is received and
we should just return because this is not a bug.
We do the same in other places where we just return early
without logging because we do not need to make any updates.
JQuery's `height` and `width` methods only takes one argument in case
we want to set height or width. The argument is of type `string` or
`number` or a function.
Refrence: https://api.jquery.com/height/#height-value.
Therefore, we can get rid of argument array and just accept a single
argument in the inner function in `make_dim_wrapper`.
Passing class methods such as `$.fn.height` as values is dangereous
because it removes type safety by failing to capture `this`.
eslint-rule: @typescript-eslint/unbound-method.
Hence, I fixed this rule by directly binding `$scroll_container`
to these methods before passing them as values to wrapper function.
Use `tabindex` instead of `href` to set focus on `a` tag.
Ideally, we should use `button` for these elements but since
we want to keep the pattern for these dropdowns same where some
`a` elements do have a valid `href`.
This fixes an unintended consequence of the silent mention conversion
logic added in 4d1ade1f88, where bots
that looked for personal mentions would not process mentions in 1:1
DMs.
Added if-else condition to check whether the
'section_head_offsets[]' is empty or not.
If it is empty then 'currently_selected' is
coded as 'Popular' else it is assigned with
'section_head_offsets[0].section'.
Fixes#24776.
use flex display justify-content for vertical alignment
instead of using offsets like "top". for horizontal
alignment of smiley-icon use text-align center.
Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
This will prevent any message we want to select after narrowing
from being offscreen entirely or partially.
Steps to reproduce the bug:
* `./manage.py populate_db -n 3000 --max-topics=2`
* Narrow to a stream and scroll high up.
* Align two recipient bars together with nothing between them.
* Click on the first recipient bar after keeping the selected message
on the second recipient bar.
* You will see that the selected message is not in view.
For example, gear menu was not closed after `Integrations` button
was clicked since we don't have an event handler which opens
`/integrations` in a new tab but we let the browser navigate user
to `/integrations` after clicking on `a href='/integrations'`.
There was no handler for hiding the popover after clicking on such
links, so this commit adds one.