title: Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError) after dismissing confirm popup
body: <p>I have a page with something like this:</p>
  
  <pre><code>&lt;input type="button" onclick="confirm('confirm popup');" value="click" /&gt;
  </code></pre>
  
  <p>When I go to the page and click the link:</p>
  
  <pre><code>require "watir-webdriver"
  browser = Watir::Browser.new
  browser.goto "page.html"
  browser.button.click
  </code></pre>
  
  <p>confirm popup appears. I can dismiss it with this:</p>
  
  <pre><code>require "watir-webdriver/extensions/alerts"
  browser.confirm(true) {browser.button(:value =&gt; 'Confirm').click}
  </code></pre>
  
  <p>but the I get this error message:</p>
  
  <pre><code>[remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/command_processor.js:10302:in `unknown': Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError)
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -&gt; file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:85:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -&gt; file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:516:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -&gt; file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/dispatcher.js:351:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/driver-component.js -&gt; file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/webdriverserver.js:47:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1935:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:2261:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1168:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1616:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1464:in `unknown'
      from [remote server] file:///var/folders/yx/bz_81fc143b4r9pyhks300m00000gn/T/webdriver-profile20120218-1562-7b7q8d/extensions/fxdriver@googlecode.com/components/httpd.js:1333:in `unknown'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/http/default.rb:64:in `request'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/bridge.rb:590:in `raw_execute'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/bridge.rb:568:in `execute'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/remote/bridge.rb:314:in `executeScript'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/selenium-webdriver-2.19.0/lib/selenium/webdriver/common/driver.rb:209:in `execute_script'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/watir-webdriver-0.5.3/lib/watir-webdriver/browser.rb:129:in `execute_script'
      from /Users/zeljko/.rvm/gems/ruby-1.9.3-p125/gems/watir-webdriver-0.5.3/lib/watir-webdriver/extensions/alerts.rb:39:in `confirm'
      from popup.rb:7:in `&lt;main&gt;'
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Environment:</p>
  
  <ul>
  <li>Mac OS X 10.7.3</li>
  <li>Firefox 10.0.2</li>
  <li>Ruby 1.9.3p125</li>
  <li>selenium-webdriver 2.19.0</li>
  <li>watir-webdriver 0.5.3</li>
  </ul>