Skip to content

Commit 2993b05

Browse files
committed
Remove unnecessary escaping of the dot in the element ID. This would only be necessary for a querySelector.
1 parent ac1796e commit 2993b05

File tree

2 files changed

+4
-9
lines changed
  • ts/WoltLabSuite/Core/Component/Option
  • wcfsetup/install/files/js/WoltLabSuite/Core/Component/Option

2 files changed

+4
-9
lines changed

ts/WoltLabSuite/Core/Component/Option/Enable.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,10 @@ function enableOption(element: HTMLElement, enable: boolean) {
9393

9494
const parentOptionTypeBoolean = element.closest(".optionTypeBoolean");
9595
if (parentOptionTypeBoolean) {
96-
// escape dots so that they are not recognized as class selectors
97-
const elementId = element.id.replace(/\./g, "\\.");
98-
99-
const noElement = document.getElementById(elementId + "_no") as HTMLInputElement;
96+
const noElement = document.getElementById(element.id + "_no") as HTMLInputElement;
10097
noElement.disabled = !enable;
10198

102-
const neverElement = document.getElementById(elementId + "_never") as HTMLInputElement;
99+
const neverElement = document.getElementById(element.id + "_never") as HTMLInputElement;
103100
if (neverElement) {
104101
neverElement.disabled = !enable;
105102
}

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Option/Enable.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)