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
Post a Comment