mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Move issue reporter data section below steps to reproduce, fixes #49087
This commit is contained in:
@@ -318,18 +318,31 @@ export class IssueReporter extends Disposable {
|
||||
label.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
// Stop propgagation not working as expected in this case https://bugs.chromium.org/p/chromium/issues/detail?id=809801
|
||||
// preventDefault does prevent outer details tag from toggling, so use that and manually toggle the checkbox
|
||||
e.preventDefault();
|
||||
const containingDiv = (<HTMLLabelElement>e.target).parentElement;
|
||||
const checkbox = <HTMLInputElement>containingDiv.firstElementChild;
|
||||
if (checkbox) {
|
||||
checkbox.checked = !checkbox.checked;
|
||||
this.issueReporterModel.update({ [checkbox.id]: !this.issueReporterModel.getData()[checkbox.id] });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const showInfoElements = document.getElementsByClassName('showInfo');
|
||||
for (let i = 0; i < showInfoElements.length; i++) {
|
||||
const showInfo = showInfoElements.item(i);
|
||||
showInfo.addEventListener('click', (e) => {
|
||||
const label = (<HTMLDivElement>e.target);
|
||||
const containingElement = label.parentElement.parentElement;
|
||||
const info = containingElement.lastElementChild;
|
||||
if (info.classList.contains('hidden')) {
|
||||
show(info);
|
||||
label.textContent = localize('hide', "hide");
|
||||
} else {
|
||||
hide(info);
|
||||
label.textContent = localize('show', "show");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.addEventListener('issue-source', 'change', (event: Event) => {
|
||||
const fileOnExtension = JSON.parse((<HTMLInputElement>event.target).value);
|
||||
this.issueReporterModel.update({ fileOnExtension: fileOnExtension, includeExtensions: !fileOnExtension });
|
||||
|
||||
Reference in New Issue
Block a user