Skip to content

Commit 2ab963d

Browse files
Nancy LiDevtools-frontend LUCI CQ
authored andcommitted
[RPP Icicle blowtorch] Disable empty new rule
Fixed: 384116429 Change-Id: I1b30bee5ae564bcadd1739d39381ab562a91f926 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6098011 Commit-Queue: Alina Varkki <[email protected]> Reviewed-by: Alina Varkki <[email protected]> Auto-Submit: Nancy Li <[email protected]>
1 parent 6d6e86a commit 2ab963d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

front_end/panels/timeline/components/IgnoreListSetting.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,9 @@ export class IgnoreListSetting extends HTMLElement {
199199

200200
#handleInputChange(): void {
201201
const newRegex = this.#newRegexInput.value.trim();
202+
const newRegexIsNotEmpty = Boolean(newRegex);
202203
// Enable the rule if the text input field is not empty.
203-
this.#newRegexCheckbox.checkboxElement.checked = Boolean(newRegex);
204+
this.#newRegexCheckbox.checkboxElement.checked = newRegexIsNotEmpty;
204205
const {valid, message} = patternValidator(this.#getExistingRegexes(), newRegex);
205206

206207
this.#newRegexInput.classList.toggle('error-input', !valid);
@@ -210,6 +211,7 @@ export class IgnoreListSetting extends HTMLElement {
210211

211212
if (this.#editingRegexSetting) {
212213
this.#editingRegexSetting.pattern = this.#newRegexInput.value.trim();
214+
this.#editingRegexSetting.disabled = !newRegexIsNotEmpty;
213215
this.#getSkipStackFramesPatternSetting().setAsArray(this.#regexPatterns);
214216
}
215217
}

0 commit comments

Comments
 (0)