Skip to content

Commit c249c14

Browse files
committed
fix: close remotes dropdown when branch dropdown opens and vice versa
1 parent e230b08 commit c249c14

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/extensions/default/Git/src/Branch.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ define(function (require, exports) {
308308
$("#project-files-container").on("scroll", closeDropdown);
309309
$("#git-panel .table-container").on("scroll", closeDropdown);
310310
$("#titlebar .nav").on("click", closeDropdown);
311+
$("#git-panel .git-remotes").on("click", closeDropdown);
311312

312313
currentEditor = EditorManager.getCurrentFullEditor();
313314
if (currentEditor) {
@@ -322,6 +323,7 @@ define(function (require, exports) {
322323
$("#project-files-container").off("scroll", closeDropdown);
323324
$("#git-panel .table-container").off("scroll", closeDropdown);
324325
$("#titlebar .nav").off("click", closeDropdown);
326+
$("#git-panel .git-remotes").off("click", closeDropdown);
325327

326328
if (currentEditor) {
327329
currentEditor._codeMirror.off("focus", closeDropdown);
@@ -386,6 +388,7 @@ define(function (require, exports) {
386388

387389
function toggleDropdown(e) {
388390
e.stopPropagation();
391+
$("#git-panel .btn-group.open").removeClass("open");
389392
// currentTarget is only valid while the event is being dispatched,
390393
// so it has to be captured before the async branch listing below
391394
const $anchor = $(e.currentTarget);

0 commit comments

Comments
 (0)