{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/795","labels_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/795/comments","events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/795/events","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/795","id":88188711,"number":795,"title":"Question about Modal dialog","user":{"login":"nritholtz","id":5275179,"avatar_url":"https://avatars.githubusercontent.com/u/5275179?v=3","gravatar_id":"","url":"https://api.github.com/users/nritholtz","html_url":"https://github.com/nritholtz","followers_url":"https://api.github.com/users/nritholtz/followers","following_url":"https://api.github.com/users/nritholtz/following{/other_user}","gists_url":"https://api.github.com/users/nritholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/nritholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nritholtz/subscriptions","organizations_url":"https://api.github.com/users/nritholtz/orgs","repos_url":"https://api.github.com/users/nritholtz/repos","events_url":"https://api.github.com/users/nritholtz/events{/privacy}","received_events_url":"https://api.github.com/users/nritholtz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-14T14:00:22Z","updated_at":"2015-06-14T14:35:24Z","closed_at":null,"body":"Quick question about the current implementation of the Modal dialog API.\r\n\r\nI noticed in the commit for the feature, it mentions  `Confirm dialogs are accepted by default; dialogs are dismissed.` So, when someone adds an `accept_confirm` for an action, does it override this action of the dialog being accepted by default?\r\n\r\nThe only reason I ask is that I have a test case scenario (unfortunately cannot post due to proprietary) which prompts a confirm dialog, which is failing intermittently with a `Timed out waiting for modal dialog (Capybara::ModalNotFound)`. I noticed from the failed screenshot, that dialog has already been confirmed. Is it possible that the dialog was already accepted by default before the `accept_confirm` was called to evaluate the dialog?"},"comment":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/comments/111835387","html_url":"https://github.com/thoughtbot/capybara-webkit/issues/795#issuecomment-111835387","issue_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/795","id":111835387,"user":{"login":"mhoran","id":5330,"avatar_url":"https://avatars.githubusercontent.com/u/5330?v=3","gravatar_id":"","url":"https://api.github.com/users/mhoran","html_url":"https://github.com/mhoran","followers_url":"https://api.github.com/users/mhoran/followers","following_url":"https://api.github.com/users/mhoran/following{/other_user}","gists_url":"https://api.github.com/users/mhoran/gists{/gist_id}","starred_url":"https://api.github.com/users/mhoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhoran/subscriptions","organizations_url":"https://api.github.com/users/mhoran/orgs","repos_url":"https://api.github.com/users/mhoran/repos","events_url":"https://api.github.com/users/mhoran/events{/privacy}","received_events_url":"https://api.github.com/users/mhoran/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T14:35:24Z","updated_at":"2015-06-14T14:35:24Z","body":"`accept_confirm` and friends change this default behavior. This is the default behavior because it was so before the modal API was introduced in Capybara. To maintain backwards compatibility, the old behavior remains in place but can be overridden with the new API.\r\n\r\nIt probably makes sense to behave more like the other drivers in the next major bump. However, for now, backwards compatibility is more important. Removing this behavior actually simplifies the implementation a bit, so I'm looking forward to ripping it out. When it's removed, you'll get some error stating an unexpected modal was encountered, like other drivers."}}