javascript - onchange() not firing in firefox -


here's jsfiddle : http://jsfiddle.net/xpkff/330/ if open dialog, enter username , password, press button , prompted firefox's "remember password", onchange not work first time choose option dropdown if click on dropdown causes prompt dismiss. knows way around it?

edit : jsfiddle seems down, here's jsbin if can reproduce problem http://jsbin.com/wecasehanu/1/

html

 <div id="dialog">         <form autocomplete="off">             <input id="username" type="text"/>             <input id="password" type="password"/>             <button type="submit" style="height:30px;width:30px;"/>         </form>     </div>     <a href="#" id="open">open dialog</a>     <select id="ih8ff">         <option>1</option>         <option>2</option>     </select> 

javascript

$('#open').click(function() {     $('#dialog').dialog('open');  });  $('#ih8ff').change(function(){ alert("changed"); });  $('#dialog').dialog({     autoopen: false,     modal: false }); 

use on input instead. chrome , safari have different way of handling change firefox. however, input events handled in same way.

$('#open').click(function() {      $('#dialog').dialog('open');    });    $('#ih8ff').on("input change",function(){  alert("changed");  });    $('#dialog').dialog({      autoopen: false,      modal: false  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>  <div id="dialog">          <form autocomplete="off">              <input id="username" type="text"/>              <input id="password" type="password"/>              <button type="submit" style="height:30px;width:30px;"/>          </form>      </div>      <a href="#" id="open">open dialog</a>      <select id="ih8ff">          <option>1</option>          <option>2</option>      </select>


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -