Skip to content

Commit

Permalink
fix: incorrect :invalid state in shadow DOM
Browse files Browse the repository at this point in the history
Uncovered a bug where empty `pattern`, `min`, `max` and `autocomplete` were included in the shadow DOM.
  • Loading branch information
Robbert committed Sep 8, 2021
1 parent 91e5dbd commit 8f00377
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions components/form-field-textbox/stencil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export class FormFieldTextbox {
readOnly && "utrecht-textbox--readonly"
)}
type={type || "text"}
autoComplete={autoComplete}
autoComplete={autoComplete ? autoComplete : null}
disabled={disabled}
min={min}
max={max}
pattern={pattern}
min={min ? min : null}
max={max ? max : null}
pattern={pattern ? pattern : null}
placeholder={placeholder || null}
readonly={readOnly}
required={required}
Expand Down
8 changes: 4 additions & 4 deletions components/textbox/stencil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export class Textbox {
readOnly && "utrecht-textbox--readonly"
)}
type={type || "text"}
autoComplete={autoComplete}
autoComplete={autoComplete ? autoComplete : null}
disabled={disabled}
min={min}
max={max}
pattern={pattern}
min={min ? min : null}
max={max ? max : null}
pattern={pattern ? pattern : null}
placeholder={placeholder || null}
readonly={readOnly}
required={required}
Expand Down

0 comments on commit 8f00377

Please sign in to comment.