<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - JavaScript alerts from background tabs block foreground tabs"
   href="https://bugs.webkit.org/show_bug.cgi?id=155925">155925</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JavaScript alerts from background tabs block foreground tabs
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Safari 9
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>avi&#64;drissman.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is a regression with the new alert dialog behavior in Safari 9.1. If this should be reclassified to a different component or refiled in Radar, please let me know.

Safari 9.1 introduced a new auto-dismissal feature with alert dialogs, where alerts are dismissed when switched away from. Unfortunately, it doesn't block alerts happening in background tabs, which leads to issues.

Repro:
1. Go to <a href="http://www.w3schools.com/jsref/met_win_alert.asp">http://www.w3schools.com/jsref/met_win_alert.asp</a>
2. Click the &quot;Try it yourself &gt;&gt;&quot; button. This will result in a new tab.
3. In the new tab, paste in to the left side this code, and click &quot;See Result &gt;&gt;&quot;
---8&lt;---
&lt;html&gt;&lt;body&gt;
&lt;button onclick=&quot;myFunction()&quot;&gt;Go&lt;/button&gt;
&lt;script&gt;
function myFunction() { setTimeout(lalala, 5000); }
function lalala() { alert(&quot;hi&quot;); }
&lt;/script&gt;
&lt;/body&gt;&lt;/html&gt;
---8&lt;---
4. Click the &quot;Go&quot; button in the right pane.
5. Within the next five seconds, switch back to the original tab.
6. After five seconds, attempt to interact with the original tab.

You'll find that because the background tab has shown an alert, it has locked up the foreground tab and all other tabs that share a renderer. In addition, it's worse, because there is no UI affordance to let the user know *why* their tab locked up. They have to poke around at all the tabs to see which one was showing an alert.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>