Fix action dropdowns focusing hidden button & fix ext action button (#21326)

This commit is contained in:
Charles Gagnon
2022-11-29 22:41:48 -08:00
committed by GitHub
parent 23dfd690a6
commit 62d5c1f2d6
3 changed files with 5 additions and 15 deletions

View File

@@ -3,14 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-dropdown {
width: 100%;
/* TODO: Determine a more permanent fix; vs/dropdown is overwriting this selector in packaged builds */
display: flex !important;
align-items: flex-start;
cursor: pointer;
}
.monaco-dropdown > .dropdown-label {
width: 100%;
}

View File

@@ -186,6 +186,10 @@ export class ActionWithDropdownActionViewItem extends ActionViewItem {
this.dropdownMenuActionViewItem.render(this.element);
this._register(addDisposableListener(this.element, EventType.KEY_DOWN, e => {
// {{SQL CARBON EDIT}} If we don't have any items then the dropdown is hidden so don't try to focus it #20877
if (menuActionsProvider.getActions().length === 0) {
return;
}
const event = new StandardKeyboardEvent(e);
let handled: boolean = false;
if (this.dropdownMenuActionViewItem?.isFocused() && event.equals(KeyCode.LeftArrow)) {

View File

@@ -56,12 +56,6 @@
display: none;
}
/* {{SQL CARBON EDIT}} - hide drop-down to avoid rendering bug */
.extension-editor .details .monaco-action-bar .monaco-dropdown,
.extensions-viewlet > .extensions .monaco-action-bar .monaco-dropdown {
width: 0px;
}
.extensions-viewlet > .extensions .extensions-list.hidden,
.extensions-viewlet > .extensions .message-container.hidden {
display: none;