From 8470c131fa1eaacdf5a2278b69e79939fe761dcc Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Fri, 9 Aug 2019 12:31:54 +0530 Subject: Focus on the input when clicked outside the input Fixed in MR list and branch list components. Earlier clicking right outside the input box closed the dropdown, which was unexpected behaviour. To make it consistent with the behaviour of select2 jquery plugin, I have made clicking outside the input focus on the input by using a label. --- .../ide/components/branches/search_list.vue | 24 +++++++++----------- .../ide/components/merge_requests/list.vue | 26 ++++++++++------------ app/assets/stylesheets/page_bundles/ide.scss | 2 +- ...-ide-mr-branch-dropdown-closes-unexpectedly.yml | 5 +++++ 4 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 changelogs/unreleased/61332-web-ide-mr-branch-dropdown-closes-unexpectedly.yml diff --git a/app/assets/javascripts/ide/components/branches/search_list.vue b/app/assets/javascripts/ide/components/branches/search_list.vue index 3cfdc1a367a..5e82d1150a0 100644 --- a/app/assets/javascripts/ide/components/branches/search_list.vue +++ b/app/assets/javascripts/ide/components/branches/search_list.vue @@ -58,19 +58,17 @@ export default { diff --git a/app/assets/stylesheets/page_bundles/ide.scss b/app/assets/stylesheets/page_bundles/ide.scss index cbcd8a474f1..551c7cf5deb 100644 --- a/app/assets/stylesheets/page_bundles/ide.scss +++ b/app/assets/stylesheets/page_bundles/ide.scss @@ -1188,7 +1188,7 @@ $ide-commit-header-height: 48px; .input-icon { right: auto; - left: 10px; + left: 26px; top: 50%; transform: translateY(-50%); } diff --git a/changelogs/unreleased/61332-web-ide-mr-branch-dropdown-closes-unexpectedly.yml b/changelogs/unreleased/61332-web-ide-mr-branch-dropdown-closes-unexpectedly.yml new file mode 100644 index 00000000000..1f5e507d48d --- /dev/null +++ b/changelogs/unreleased/61332-web-ide-mr-branch-dropdown-closes-unexpectedly.yml @@ -0,0 +1,5 @@ +--- +title: Fix an issue where clicking outside the MR/branch search box in WebIDE closed the dropdown. +merge_request: 31523 +author: +type: fixed -- cgit v1.2.1 From 4b9328c1c8b2c3c1e1c90b12db29e2250930b7c0 Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Fri, 9 Aug 2019 12:35:55 +0530 Subject: Reduce the default height of MR/branch dropdowns To avoid having empty areas in the dropdown that occupy unnessary space, I removed the dropdown's min-height and changed its default height in empty state to be same as its loading state (with the spinner). --- app/assets/javascripts/ide/components/branches/search_list.vue | 4 ++-- app/assets/javascripts/ide/components/merge_requests/list.vue | 4 ++-- app/assets/stylesheets/page_bundles/ide.scss | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/ide/components/branches/search_list.vue b/app/assets/javascripts/ide/components/branches/search_list.vue index 5e82d1150a0..db8365a08e0 100644 --- a/app/assets/javascripts/ide/components/branches/search_list.vue +++ b/app/assets/javascripts/ide/components/branches/search_list.vue @@ -67,7 +67,7 @@ export default { class="form-control dropdown-input-field" @input="searchBranches" /> - +