You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug TypeError: can't access property "checkValidity", this.input is undefined
It is possible to reference this.input in <sl-input> before the internal render() function is called (and hence assigns this.input).
To Reproduce
When using <sl-input> underneath a custom Hybrids component, I was able to trigger the reference error. I have not been able to reproduce it with codepen.
Expected behavior
handlers should queue handling (or at least fail gracefully) if internal references are not populated.
Screenshots
Desktop (please complete the following information):
OS X Firefox 85
Additional context
I'm able to reproduce this in my own (rather complex) build setup with webpack. Regardless of reproducibility. It's clear to see that there is a race condition in the code where several handlers assume that this.input is populated where there are scenarios where the handlers can be called before render() is called.
The text was updated successfully, but these errors were encountered:
I thought about this and adding a guard is the simplest fix. I'm OK with the assumption that if the value somehow changes between when the component is connected and first render, then the value at first render will be the initial value. Fixed in both input and textarea.
Describe the bug
TypeError: can't access property "checkValidity", this.input is undefined
It is possible to reference
this.input
in<sl-input>
before the internalrender()
function is called (and hence assignsthis.input
).To Reproduce
When using
<sl-input>
underneath a custom Hybrids component, I was able to trigger the reference error. I have not been able to reproduce it with codepen.Expected behavior
handlers should queue handling (or at least fail gracefully) if internal references are not populated.
Screenshots
Desktop (please complete the following information):
OS X Firefox 85
Additional context
I'm able to reproduce this in my own (rather complex) build setup with webpack. Regardless of reproducibility. It's clear to see that there is a race condition in the code where several handlers assume that
this.input
is populated where there are scenarios where the handlers can be called beforerender()
is called.The text was updated successfully, but these errors were encountered: