{"action":"created","issue":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2434","repository_url":"https://api.github.com/repos/SeleniumHQ/selenium","labels_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2434/labels{/name}","comments_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2434/comments","events_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2434/events","html_url":"https://github.com/SeleniumHQ/selenium/issues/2434","id":164207221,"number":2434,"title":"Clicking inside iframe with webdriver on Firefox causing page scroll unexpectedly","user":{"login":"wyhmichael","id":1003413,"avatar_url":"https://avatars.githubusercontent.com/u/1003413?v=3","gravatar_id":"","url":"https://api.github.com/users/wyhmichael","html_url":"https://github.com/wyhmichael","followers_url":"https://api.github.com/users/wyhmichael/followers","following_url":"https://api.github.com/users/wyhmichael/following{/other_user}","gists_url":"https://api.github.com/users/wyhmichael/gists{/gist_id}","starred_url":"https://api.github.com/users/wyhmichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wyhmichael/subscriptions","organizations_url":"https://api.github.com/users/wyhmichael/orgs","repos_url":"https://api.github.com/users/wyhmichael/repos","events_url":"https://api.github.com/users/wyhmichael/events{/privacy}","received_events_url":"https://api.github.com/users/wyhmichael/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-07T00:56:23Z","updated_at":"2016-07-07T06:55:50Z","closed_at":null,"body":"## Meta -\r\nOS:  \r\n<!-- Windows 7 -->\r\nSelenium Version:  2.53.0, 2.53.1\r\n<!-- 2.53.0, IDE, etc -->\r\nBrowser:  Firefox 47, Firefox 48.0b4\r\n<!-- Internet Explorer?  Firefox? \r\n\r\nFirefox 47? Did you search for issues first? You're likely logging a duplicate bug of #2110\r\n\r\nIf the issue is with Google Chrome consider logging an issue with chromedriver instead:\r\nhttps://sites.google.com/a/chromium.org/chromedriver/help\r\n\r\nIf the issue is with Microsoft Edge consider logging an issue with Microsoft instead:\r\nhttps://developer.microsoft.com/en-us/microsoft-edge/platform/issues/\r\n\r\nIf the issue is with Firefox GeckoDriver (aka Marionette) consider loogging an issue with Mozilla:\r\nhttps://bugzilla.mozilla.org/buglist.cgi?product=Testing&component=Marionette\r\n\r\nIf the issue is with PhantomJS consider logging an issue with Ghostdriver:\r\nhttps://github.com/detro/ghostdriver\r\n\r\n-->\r\n\r\nBrowser Version:  47, 48\r\n<!-- e.g.: 49.0.2623.87 (64-bit) -->\r\n\r\n## Expected Behavior -\r\nClicking inside iframe should not cause the unexpected scrolling\r\n## Actual Behavior -\r\nClicking inside iframe caused the unexpected scrolling\r\n## Steps to reproduce -\r\n\r\n<!-- Please be sure to include an SSCCE (Short, Self Contained, Correct [compilable] example) http://sscce.org/ -->\r\n1. I made this sample page containing an iframe inside which there are 5 buttons with absolute positions\r\n\r\n2. I used firefox webdriver to click buttons from right to left one by one, when clicking on the last one, page scrolled unexpectedly\r\n\r\n```\r\nFirefoxDriver driver = new FirefoxDriver();\r\ndriver.get(\"http://seleniumbug.rf.gd/\");\r\ndriver.switchTo().frame(\"game-frame\");\r\ndriver.findElement(By.id(\"myButton1\")).click();\r\ndriver.findElement(By.id(\"myButton2\")).click();\r\ndriver.findElement(By.id(\"myButton3\")).click();\r\ndriver.findElement(By.id(\"myButton4\")).click();\r\ndriver.findElement(By.id(\"myButton5\")).click();\r\n```\r\n\r\n## Comment -\r\n\r\n1. I only tried with latest 2 versions of selenium and firefox,  but I believe this is related to this commit: https://github.com/SeleniumHQ/selenium/commit/2f4a6d884e5a3eff6791b1006bb65f045c6d2494, \r\n\r\nI have to say it's very arguable to add scrollintoview in the click function; from my point of view scrollintoview is better to go as a separate function instead of modifying the existing click function, if it's badly needed, because click should be as simple as possible to do just clicking, and selenium should give flexibility to users to scroll or not, rather than brutally scroll regarless; besides, we as users of selenium are highly depending on the click function, I would prefer you don't add uncertain things to it unless you can test it properly, that would be highly appreciated"},"comment":{"url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/comments/230998244","html_url":"https://github.com/SeleniumHQ/selenium/issues/2434#issuecomment-230998244","issue_url":"https://api.github.com/repos/SeleniumHQ/selenium/issues/2434","id":230998244,"user":{"login":"oddui","id":720036,"avatar_url":"https://avatars.githubusercontent.com/u/720036?v=3","gravatar_id":"","url":"https://api.github.com/users/oddui","html_url":"https://github.com/oddui","followers_url":"https://api.github.com/users/oddui/followers","following_url":"https://api.github.com/users/oddui/following{/other_user}","gists_url":"https://api.github.com/users/oddui/gists{/gist_id}","starred_url":"https://api.github.com/users/oddui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oddui/subscriptions","organizations_url":"https://api.github.com/users/oddui/orgs","repos_url":"https://api.github.com/users/oddui/repos","events_url":"https://api.github.com/users/oddui/events{/privacy}","received_events_url":"https://api.github.com/users/oddui/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T06:55:50Z","updated_at":"2016-07-07T06:55:50Z","body":"@wyhmichael it's defined in the [spec](https://www.w3.org/TR/webdriver/#element-click) clicking elements\r\n\r\nI think ChromeDriver also does it.\r\n\r\nYou may try using the click action if you don't want scrolling."}}
{"actor":{"display_login":"oddui"}}