jquery - window.focus not working on already open window in firefox -


my code not working firefox same code working in chrome. here code:

$( "#confirm" ).dialog({          resizable: true,         modal: true,         buttons: {              "yes": function() {                 newwindow = window.open(url,"mywindow","status=1,width=870,height=530");                 newwindow.focus();                  $( ).dialog( "close" );              }         }    }); 

i want bring focus if window opened. not working in firefox.

for reason current window getting focus. solve problem add 1 more function below focus this:

$( "#confirm" ).dialog({      resizable: true,     modal: true,     buttons: {          "yes": function() {             newwindow = window.open(url,"mywindow","status=1,width=870,height=530");             newwindow.focus();             newwindow.moveto(0,0);              $( ).dialog( "close" );          }     } }); 

so, add moveto(0,0); bring focus again window , doesn't effect window.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -