{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/2897","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/2897/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/2897/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/2897/events","html_url":"https://github.com/driftyco/ionic/issues/2897","id":53750459,"number":2897,"title":"bug: Focus on input field and overflow-scroll=true windows automatically scrolls to top","user":{"login":"3x14159265","id":2430996,"avatar_url":"https://avatars.githubusercontent.com/u/2430996?v=3","gravatar_id":"","url":"https://api.github.com/users/3x14159265","html_url":"https://github.com/3x14159265","followers_url":"https://api.github.com/users/3x14159265/followers","following_url":"https://api.github.com/users/3x14159265/following{/other_user}","gists_url":"https://api.github.com/users/3x14159265/gists{/gist_id}","starred_url":"https://api.github.com/users/3x14159265/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3x14159265/subscriptions","organizations_url":"https://api.github.com/users/3x14159265/orgs","repos_url":"https://api.github.com/users/3x14159265/repos","events_url":"https://api.github.com/users/3x14159265/events{/privacy}","received_events_url":"https://api.github.com/users/3x14159265/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic/labels/ionitron:closed","name":"ionitron:closed","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-08T13:32:01Z","updated_at":"2015-05-08T22:41:23Z","closed_at":"2015-05-08T22:41:23Z","body":"**Type**: <span ionic-type>bug</span>\n\n**Platform**: <span ionic-platform>all</span>  \n\n<span ionic-description>I'm using overflow-scroll=true in an ionic list on android (since the performance of ionic scrolling is terrible on android). Each list item has an input field. When the input field is focused, the window automatically scrolls to the top of the window. IMHO, that shouldn't be the way it should work.\n\nI found the corresponding lines in the ionic.bundle.js (line 3347-3358):\n\n<code>\nfunction keyboardBrowserFocusIn(e) {\n  if( !e.target || !ionic.tap.isTextInput(e.target) || ionic.tap.isDateInput(e.target) || !keyboardIsWithinScroll(e.target) ) return;\n\n  document.addEventListener('keydown', keyboardOnKeyDown, false);\n\n  document.body.scrollTop = 0;\n  document.body.querySelector('.scroll-content').scrollTop = 0;\n\n  keyboardActiveElement = e.target;\n\n  keyboardSetShow(e);\n}\n</code>\n\nso, if I got it right, when opening the Keyboard, the window (body) scrolls to top and then the ionic scrolling scrolls to the input field position. when using overflow-scroll=true, it only scrolls to top.\nnevertheless, it should never scroll to top when opening the keyboard, since even with ionic scrolling you see the flickering of scrolling to top and then down to the input field again.</span>\n\n<span is-issue-template></span>\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/100387285","html_url":"https://github.com/driftyco/ionic/issues/2897#issuecomment-100387285","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/2897","id":100387285,"user":{"login":"Ionitron","id":6591344,"avatar_url":"https://avatars.githubusercontent.com/u/6591344?v=3","gravatar_id":"","url":"https://api.github.com/users/Ionitron","html_url":"https://github.com/Ionitron","followers_url":"https://api.github.com/users/Ionitron/followers","following_url":"https://api.github.com/users/Ionitron/following{/other_user}","gists_url":"https://api.github.com/users/Ionitron/gists{/gist_id}","starred_url":"https://api.github.com/users/Ionitron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ionitron/subscriptions","organizations_url":"https://api.github.com/users/Ionitron/orgs","repos_url":"https://api.github.com/users/Ionitron/repos","events_url":"https://api.github.com/users/Ionitron/events{/privacy}","received_events_url":"https://api.github.com/users/Ionitron/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T22:41:23Z","updated_at":"2015-05-08T22:41:23Z","body":"Greetings @3x14159265!\n\nI've closed this issue because my sensors indicated it was old and inactive, and may have already been fixed in recent versions of Ionic. However, if you are still experiencing this issue, please feel free to reopen this issue by creating a new one, and include any examples and other necessary information, so that we can look into it further.\n\nThank you for allowing me to assist you."}}