AnsweredAssumed Answered

Possible bug: Getting dom node element from expand in 4.15 v 4.16

Question asked by bkvannostrand on Sep 23, 2020

Hi all,

 

I think I've found a bug. When I'm using the 4.15 Javascript API and modifying the content of an empty expand widget, I can create a dom node for that content using the dojo/domConstruct/create method, assigning a string of HTML as the "innerHTML" of that constructed dom node, then using it as the content of an expand widget and adding that widget to the map view. Within this dom node, I have a button with the ID "applyButton". When using 4.15, I can use a watchUtils.whenTrueOnce to listen for the widget to be expanded, then assign a pre-declared variable as that button using document.getElementById. This works fine in 4.15, but when I switch to 4.16, this breaks even though the button is part of the document when that variable assignment is attempted. Does anyone know if watch utils or expands were changed between 4.15 and 4.16?

I'll attach my code below but I'm using webpack so some of it might look a little weird. The dom node is created at line 374, the expand is created at line 442, then added at line 478. The code is failing at line 490.

 

Thanks!

Brian

Attachments

Outcomes