mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
fix softDispatch
returning NoMatchingKb
vs null
See https://github.com/microsoft/vscode/issues/179528#issuecomment-1535454131
This commit is contained in:
parent
4b739b573f
commit
e0c11a8414
|
@ -16,6 +16,7 @@ import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifec
|
|||
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ResultKind } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
|
||||
export class HoverService implements IHoverService {
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
@ -114,7 +115,7 @@ export class HoverService implements IHoverService {
|
|||
}
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
const keybinding = this._keybindingService.resolveKeyboardEvent(event);
|
||||
if (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target)) {
|
||||
if (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target)?.kind !== ResultKind.NoMatchingKb) {
|
||||
return;
|
||||
}
|
||||
if (hideOnKeyDown && (!this._currentHoverOptions?.trapFocus || e.key !== 'Tab')) {
|
||||
|
|
Loading…
Reference in a new issue