Commit 598e9ff9 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '61332-web-ide-mr-branch-dropdown-closes-unexpectedly' into 'master'

Resolve "Web IDE MR/branch dropdown closes unexpectedly"

Closes #61332

See merge request gitlab-org/gitlab-ce!31523
parents f33a7530 4b9328c1
...@@ -58,26 +58,24 @@ export default { ...@@ -58,26 +58,24 @@ export default {
<template> <template>
<div> <div>
<div class="dropdown-input mt-3 pb-3 mb-0 border-bottom"> <label class="dropdown-input pt-3 pb-3 mb-0 border-bottom block position-relative" @click.stop>
<div class="position-relative"> <input
<input ref="searchInput"
ref="searchInput" v-model="search"
v-model="search" :placeholder="__('Search branches')"
:placeholder="__('Search branches')" type="search"
type="search" class="form-control dropdown-input-field"
class="form-control dropdown-input-field" @input="searchBranches"
@input="searchBranches" />
/> <icon :size="18" name="search" class="ml-3 input-icon" />
<icon :size="18" name="search" class="input-icon" /> </label>
</div>
</div>
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
<gl-loading-icon <gl-loading-icon
v-if="isLoading" v-if="isLoading"
:size="2" :size="2"
class="mt-3 mb-3 align-self-center ml-auto mr-auto" class="mt-3 mb-3 align-self-center ml-auto mr-auto"
/> />
<ul v-else class="mb-3 w-100"> <ul v-else class="mb-0 w-100">
<template v-if="hasBranches"> <template v-if="hasBranches">
<li v-for="item in branches" :key="item.name"> <li v-for="item in branches" :key="item.name">
<item :item="item" :project-id="currentProjectId" :is-active="isActiveBranch(item)" /> <item :item="item" :project-id="currentProjectId" :is-active="isActiveBranch(item)" />
......
...@@ -76,19 +76,17 @@ export default { ...@@ -76,19 +76,17 @@ export default {
<template> <template>
<div> <div>
<div class="dropdown-input mt-3 pb-3 mb-0 border-bottom"> <label class="dropdown-input pt-3 pb-3 mb-0 border-bottom block" @click.stop>
<div class="position-relative"> <tokened-input
<tokened-input v-model="search"
v-model="search" :tokens="searchTokens"
:tokens="searchTokens" :placeholder="__('Search merge requests')"
:placeholder="__('Search merge requests')" @focus="onSearchFocus"
@focus="onSearchFocus" @input="searchMergeRequests"
@input="searchMergeRequests" @removeToken="setSearchType(null)"
@removeToken="setSearchType(null)" />
/> <icon :size="18" name="search" class="ml-3 input-icon" />
<icon :size="18" name="search" class="input-icon" /> </label>
</div>
</div>
<div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex">
<gl-loading-icon <gl-loading-icon
v-if="isLoading" v-if="isLoading"
...@@ -96,7 +94,7 @@ export default { ...@@ -96,7 +94,7 @@ export default {
class="mt-3 mb-3 align-self-center ml-auto mr-auto" class="mt-3 mb-3 align-self-center ml-auto mr-auto"
/> />
<template v-else> <template v-else>
<ul class="mb-3 w-100"> <ul class="mb-0 w-100">
<template v-if="showSearchTypes"> <template v-if="showSearchTypes">
<li v-for="searchType in $options.searchTypes" :key="searchType.type"> <li v-for="searchType in $options.searchTypes" :key="searchType.type">
<button <button
...@@ -107,7 +105,7 @@ export default { ...@@ -107,7 +105,7 @@ export default {
<span class="d-flex append-right-default ide-search-list-current-icon"> <span class="d-flex append-right-default ide-search-list-current-icon">
<icon :size="18" name="search" /> <icon :size="18" name="search" />
</span> </span>
<span> {{ searchType.label }} </span> <span>{{ searchType.label }}</span>
</button> </button>
</li> </li>
</template> </template>
......
...@@ -1216,11 +1216,10 @@ $ide-commit-header-height: 48px; ...@@ -1216,11 +1216,10 @@ $ide-commit-header-height: 48px;
} }
.ide-search-list-empty { .ide-search-list-empty {
height: 230px; height: 69px;
} }
.ide-merge-requests-dropdown-content { .ide-merge-requests-dropdown-content {
min-height: 230px;
max-height: 470px; max-height: 470px;
} }
......
---
title: Fix an issue where clicking outside the MR/branch search box in WebIDE closed the dropdown.
merge_request: 31523
author:
type: fixed
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