1
0
mirror of https://github.com/salexdv/bsl_console.git synced 2024-11-30 08:57:08 +02:00

Merge pull request #101 from tormozit/develop

Fix unwanted keyDown after EVENT_ON_SELECT_SUGGEST_ROW
This commit is contained in:
Alexander Shkuraev 2021-05-09 21:14:10 +03:00 committed by GitHub
commit d83279854c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1035,6 +1035,12 @@ define(['bslGlobals', 'bslMetadata', 'snippets', 'bsl_language', 'vs/editor/edit
if (element) {
let rows = getSuggestWidgetRows(element);
genarateEventWithSuggestData('EVENT_ON_SELECT_SUGGEST_ROW', rows, 'selection', element.getAttribute('aria-label'));
// Prevent propagation of KeyDown event to editor if SuggestList was closed in EVENT_ON_SELECT_SUGGEST_ROW event handler https://github.com/salexdv/bsl_console/issues/90
element = document.querySelector('.monaco-list-row.focused');
if (!element) {
e.preventDefault()
}
}
}
else if (e.ctrlKey && e.keyCode == 36) {