Closed twrichards closed 3 years ago
hey @jukben - although the e2e cypress tests are timing out at the moment - is there any chance I could get a provisional review of this PR please?
hey @jukben - the cypress tests are now all passing - please could I get a cheeky review? (and all being well, a release) 🙏
Released in 4.8
I was running into problems where it couldn't retrieve the
target
from the event in the internal_changeHandler
when this library is being used in the Shadow DOM.This PR adds a fallback when obtaining the textarea in the
_changeHandler
, to use thetextAreaRef
(which should already be populated) if theevent.target
isundefined
/null
.I also make sure the
target
property on the event passed to theonChange
(provided by the consumer of the library) makes use of this more robust textarea variable.