Commit ce7cbdcb authored by Mike Greiling's avatar Mike Greiling

Merge branch 'fix-dropdown-closing' into 'master'

Fix dropdown closing when mouseup is outside

See merge request gitlab-org/gitlab-ce!32084
parents 921d4f37 88cf7591
......@@ -60,7 +60,7 @@ class DropLab {
addEvents() {
this.eventWrapper.documentClicked = this.documentClicked.bind(this);
document.addEventListener('click', this.eventWrapper.documentClicked);
document.addEventListener('mousedown', this.eventWrapper.documentClicked);
}
documentClicked(e) {
......@@ -74,7 +74,7 @@ class DropLab {
}
removeEvents() {
document.removeEventListener('click', this.eventWrapper.documentClicked);
document.removeEventListener('mousedown', this.eventWrapper.documentClicked);
}
changeHookList(trigger, list, plugins, config) {
......
---
title: Fix dropdowns closing when click is released outside the dropdown
merge_request: 32084
author:
type: fixed
......@@ -73,7 +73,7 @@ shared_examples 'thread comments' do |resource_name|
expect(page).not_to have_selector menu_selector
find(toggle_selector).click
execute_script("document.querySelector('body').click()")
find("#{form_selector} .note-textarea").click
expect(page).not_to have_selector menu_selector
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment