mirror of https://github.com/zulip/zulip.git
emoji_picker: Add expectOne to emoji_picker.navigate.
There is apparently some way to have two instances of `.emoji-popover-emoji-map`, although I can't reproduce it. This causes an `expectOne` check to fail fairly deep in the stack. Now we report it more directly. This commit and a few previous ones mostly address #15348 by trying to either a) not depending on having a single instance of the popover or b) making it more explicit in cases where do expect that invariant. Fixes #15348
This commit is contained in:
parent
91dec2729f
commit
9423d150ac
|
@ -390,7 +390,8 @@ exports.navigate = function (event_name) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const $emoji_map = $(".emoji-popover-emoji-map");
|
const $popover = $(".emoji-popover").expectOne();
|
||||||
|
const $emoji_map = $popover.find(".emoji-popover-emoji-map").expectOne();
|
||||||
|
|
||||||
const selected_emoji = get_rendered_emoji(current_section, current_index);
|
const selected_emoji = get_rendered_emoji(current_section, current_index);
|
||||||
const is_filter_focused = $('.emoji-popover-filter').is(':focus');
|
const is_filter_focused = $('.emoji-popover-filter').is(':focus');
|
||||||
|
|
Loading…
Reference in New Issue