提交 153ffd21 编写于 作者: R Rachel Macfarlane

Issue reporter sys info/extensions drop down UX issues, #42564

上级 b54b3296
...@@ -245,6 +245,24 @@ export class IssueReporter extends Disposable { ...@@ -245,6 +245,24 @@ export class IssueReporter extends Disposable {
}); });
}); });
const labelElements = document.getElementsByClassName('caption');
for (let i = 0; i < labelElements.length; i++) {
const label = labelElements.item(i);
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] });
}
});
}
document.getElementById('reproducesWithoutExtensions').addEventListener('click', (e) => { document.getElementById('reproducesWithoutExtensions').addEventListener('click', (e) => {
this.issueReporterModel.update({ reprosWithoutExtensions: true }); this.issueReporterModel.update({ reprosWithoutExtensions: true });
}); });
......
...@@ -36,9 +36,8 @@ export default (): string => ` ...@@ -36,9 +36,8 @@ export default (): string => `
<details> <details>
<summary>${escape(localize('systemInfo', "My System Info"))} <summary>${escape(localize('systemInfo', "My System Info"))}
<div class="include-data"> <div class="include-data">
<input class="sendData" type="checkbox" id="includeSystemInfo" checked> <input class="sendData" type="checkbox" id="includeSystemInfo" checked/>
<label class="caption" for="includeSystemInfo">${escape(localize('sendData', "Send my data"))}</label> <label class="caption" for="includeSystemInfo">${escape(localize('sendData', "Send my data"))}</label>
</input>
</div> </div>
</summary> </summary>
<div class="block-info"> <div class="block-info">
...@@ -50,9 +49,8 @@ export default (): string => ` ...@@ -50,9 +49,8 @@ export default (): string => `
<details> <details>
<summary>${escape(localize('processes', "Currently Running Processes"))} <summary>${escape(localize('processes', "Currently Running Processes"))}
<div class="include-data"> <div class="include-data">
<input class="sendData" type="checkbox" id="includeProcessInfo" checked> <input class="sendData" type="checkbox" id="includeProcessInfo" checked/>
<label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label> <label class="caption" for="includeProcessInfo">${escape(localize('sendData', "Send my data"))}</label>
</input>
</div> </div>
</summary> </summary>
<div class="block-info"> <div class="block-info">
...@@ -64,9 +62,8 @@ export default (): string => ` ...@@ -64,9 +62,8 @@ export default (): string => `
<details> <details>
<summary>${escape(localize('workspaceStats', "My Workspace Stats"))} <summary>${escape(localize('workspaceStats', "My Workspace Stats"))}
<div class="include-data"> <div class="include-data">
<input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked> <input class="sendData" type="checkbox" id="includeWorkspaceInfo" checked/>
<label class="caption" for="includeWorkspaceInfo">${escape(localize('sendData', "Send my data"))}</label> <label class="caption" for="includeWorkspaceInfo">${escape(localize('sendData', "Send my data"))}</label>
</input>
</div> </div>
</summary> </summary>
<pre class="block-info"> <pre class="block-info">
...@@ -80,9 +77,8 @@ export default (): string => ` ...@@ -80,9 +77,8 @@ export default (): string => `
<details> <details>
<summary>${escape(localize('extensions', "My Extensions"))} <summary>${escape(localize('extensions', "My Extensions"))}
<div class="include-data"> <div class="include-data">
<input class="sendData" type="checkbox" id="includeExtensions" checked> <input class="sendData" type="checkbox" id="includeExtensions" checked/>
<label class="caption" for="includeExtensions">${escape(localize('sendData', "Send my data"))}</label> <label class="caption" for="includeExtensions">${escape(localize('sendData', "Send my data"))}</label>
</input>
</div> </div>
</summary> </summary>
<div class="block-info"> <div class="block-info">
......
...@@ -225,6 +225,7 @@ summary { ...@@ -225,6 +225,7 @@ summary {
width: 80px; width: 80px;
top: 2px; top: 2px;
left: 30px; left: 30px;
cursor: pointer;
} }
.sendData { .sendData {
...@@ -236,6 +237,7 @@ input[type="checkbox"] { ...@@ -236,6 +237,7 @@ input[type="checkbox"] {
display: inline-block; display: inline-block;
margin-top: 0; margin-top: 0;
vertical-align: middle; vertical-align: middle;
cursor: pointer;
} }
input:disabled { input:disabled {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册