AnsweredAssumed Answered

Measurement Widget : "Clear" button fires event on disable state

Question asked by Prashant.Kirpan on Jan 23, 2019
Latest reply on Jan 24, 2019 by rscheitlin

Hi All,


In Measurement Widget - click event is firing on "Clear" button even if button is in disable state.

I observed that (jimu-state-disabled) class is only changing element's colour but not preventing any user interaction.

Because of this behaviour, widget is allowing to clear\disable measurement result without finishing drawing (double click on map).



1) Select line option on tool.

2) Start drawing line, clink on map

3) Move mouse cursor directly to clear button and click 

4) Again click on map.


How can I disable click event when "jimu-state-disabled" class is applied?


One way to check class name and stop code execution but looking for best approach to handle this.


Any help would be appreciated