Skip to content

Commit 7031bd8

Browse files
fix: rename switch class/id to prevent conflicts with other elements (#1833)
1 parent 97a1364 commit 7031bd8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

elements/jsonform/src/helpers/editor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ export const createEditor = (element) => {
323323
element.propertiesToggle &&
324324
!(
325325
/**@type {HTMLInputElement}*/ (
326-
element.renderRoot.querySelector(".switch-button input")
326+
element.renderRoot.querySelector(
327+
"#properties-editing-switch input",
328+
)
327329
).checked
328330
)
329331
) {

elements/jsonform/src/main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,19 +224,19 @@ export class EOxJSONForm extends LitElement {
224224
input[type="checkbox"].json-editor-opt-in {
225225
display: none !important;
226226
}
227-
.switch-button {
227+
#properties-editing-switch {
228228
position: absolute;
229229
bottom: 2rem;
230230
right: 3rem;
231231
z-index: 5;
232232
transform: scale(1.25);
233233
}
234-
.switch-button i > svg {
234+
#properties-editing-switch i > svg {
235235
padding: 0.3rem;
236236
border-radius: 0;
237237
}
238238
@media screen and (max-width: 1024px) {
239-
.switch-button {
239+
#properties-editing-switch {
240240
right: 20px;
241241
}
242242
}
@@ -249,7 +249,7 @@ export class EOxJSONForm extends LitElement {
249249
${when(
250250
this.options?.disable_properties === false && this.propertiesToggle,
251251
() => html`
252-
<label class="switch icon switch-button">
252+
<label class="switch icon" id="properties-editing-switch">
253253
<input
254254
type="checkbox"
255255
@input=${(e) => {

0 commit comments

Comments
 (0)