In Safari browser change event not fired when modifying the element's value inside input event handler

116 Views Asked by At

While modifying the element's value inside input event of the input element , the change event is not fired in Safari browser.

I have use the below code block

`<input type="text" id="textid"\>

 <script\>
 var textcase = document.getElementById('textid');
 textcase.addEventListener('input', function(args) {
     document.getElementById('textid').value =document.getElementById('textid').value + "#";
 });
 textcase.addEventListener('change', function(){
    console.log('Change evet triggered');
 });
 </script\> `

Replication Procedure :

  1. enter a value in the input element and focusout.
  2. see the console window the change event was not triggered.

Expected behavior:

  1. When modifying the element's value inside input event of the input element. the change must trigger in the safari browser.
0

There are 0 best solutions below