Merge branch '35530-teleporting-emoji-fix' into 'master'
Fix teleporting emoji (MR description instead of comment) Closes #35530 See merge request gitlab-org/gitlab-ce!17100
This commit is contained in:
commit
e78d358bdc
|
@ -50,10 +50,8 @@ class AwardsHandler {
|
|||
|
||||
this.registerEventListener('on', $('html'), 'click', (e) => {
|
||||
const $target = $(e.target);
|
||||
if (!$target.closest('.emoji-menu-content').length) {
|
||||
$('.js-awards-block.current').removeClass('current');
|
||||
}
|
||||
if (!$target.closest('.emoji-menu').length) {
|
||||
$('.js-awards-block.current').removeClass('current');
|
||||
if ($('.emoji-menu').is(':visible')) {
|
||||
$('.js-add-award.is-active').removeClass('is-active');
|
||||
this.hideMenuElement($('.emoji-menu'));
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix Teleporting Emoji
|
||||
merge_request: 16963
|
||||
author: Jared Deckard <jared.deckard@gmail.com>
|
||||
type: fixed
|
|
@ -79,7 +79,7 @@ import '~/lib/utils/common_utils';
|
|||
return expect($emojiMenu.length).toBe(1);
|
||||
});
|
||||
});
|
||||
return it('should remove emoji menu when body is clicked', function(done) {
|
||||
it('should remove emoji menu when body is clicked', function(done) {
|
||||
$('.js-add-award').eq(0).click();
|
||||
return lazyAssert(done, function() {
|
||||
var $emojiMenu;
|
||||
|
@ -90,6 +90,17 @@ import '~/lib/utils/common_utils';
|
|||
return expect($('.js-awards-block.current').length).toBe(0);
|
||||
});
|
||||
});
|
||||
it('should not remove emoji menu when search is clicked', function(done) {
|
||||
$('.js-add-award').eq(0).click();
|
||||
return lazyAssert(done, function() {
|
||||
var $emojiMenu;
|
||||
$emojiMenu = $('.emoji-menu');
|
||||
$('.emoji-search').click();
|
||||
expect($emojiMenu.length).toBe(1);
|
||||
expect($emojiMenu.hasClass('is-visible')).toBe(true);
|
||||
return expect($('.js-awards-block.current').length).toBe(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('::addAwardToEmojiBar', function() {
|
||||
it('should add emoji to votes block', function() {
|
||||
|
|
Loading…
Reference in New Issue