Hello all,
I need to perform an action on double click of a text box, but the onDblClick event does not seem to register when the text box is not editable (i.e greyed out). Is there something I can do to solve this ?
Best, Rohan
Hello all,
I need to perform an action on double click of a text box, but the onDblClick event does not seem to register when the text box is not editable (i.e greyed out). Is there something I can do to solve this ?
Best, Rohan
How about applying the onDblClick event to the parent div your text box is in?
e.g.
<div ondblclick="someAction()"><input type="text" readonly="true" /></div>
Apparently ,
The legacy code was using the 'disabled' property of the element to toggle editability of the text box. So that also disables events on the text box.
textElement.disabled = true;
To fix this,
I used the 'readOnly' property of the element for the editability toggling needs and now it registers events.
textElement.readOnly = true;
Thanks for reading!
Rohan.