window being pushed back when an alert is raised in IE11

136 Views Asked by At

We are currently in the process of maintenance for IE11 in the service.

  1. There are two forms that raise an alert on focusout.
  2. In this case, let's call the two forms A_form and B_form.
  3. After clicking A_form, select B_form.
  4. At this time, focusout occurs in A_form and an alert is raised.
  5. After clicking OK on the alert, click a_form.
  6. (Error) If there are multiple windows in the window, the window with the form is pushed back.

I am in the same situation as above. Why are you doing this? Any help would be appreciated. Thank. I didn't speak English well, so I used a translator. Please understand the clumsy context. It only happens in IE11. I tested firefox, chrome and edge.

My development environment is as follows : windows10, IE11 The sample code below is attached.

function A_alert() {
    alert("a_form alert");
}

function B_alert() {
    alert("b_form alert");
}
<input id="a_form" type="text" onfocusout="A_alert()">
<input id="b_form" type="password" onfocusout="B_alert()">

console.log():

a_form : mouse down
a_form : focus
a_form : mouse up
a_form : click
b_form : mouse down
a_form : focus out
b_form : mouse up
a_alert : ok
a_form : blur
b_form : focus
b_form : focus out
b_alert :raised error
1

There are 1 best solutions below

1
On
<form>
   <input id="a_form" type="text" onfocusout="A_alert()" />
   <input id="b_form" type="password" onfocusout="B_alert()" />
</form>

wrap by form in IE