{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32231","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32231/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32231/comments","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32231/events","html_url":"https://github.com/mozilla-b2g/gaia/pull/32231","id":109764021,"number":32231,"title":"Bug 1210341 - Remove additional subtraction in keyboard overlapping examination. r=timdream","user":{"login":"chenpighead","id":10356583,"avatar_url":"https://avatars.githubusercontent.com/u/10356583?v=3","gravatar_id":"","url":"https://api.github.com/users/chenpighead","html_url":"https://github.com/chenpighead","followers_url":"https://api.github.com/users/chenpighead/followers","following_url":"https://api.github.com/users/chenpighead/following{/other_user}","gists_url":"https://api.github.com/users/chenpighead/gists{/gist_id}","starred_url":"https://api.github.com/users/chenpighead/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenpighead/subscriptions","organizations_url":"https://api.github.com/users/chenpighead/orgs","repos_url":"https://api.github.com/users/chenpighead/repos","events_url":"https://api.github.com/users/chenpighead/events{/privacy}","received_events_url":"https://api.github.com/users/chenpighead/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-05T09:48:34Z","updated_at":"2015-10-19T09:33:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32231","html_url":"https://github.com/mozilla-b2g/gaia/pull/32231","diff_url":"https://github.com/mozilla-b2g/gaia/pull/32231.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/32231.patch"},"body":"In the original code, we calculate posTop with (selectDialogBottom + distanceFromBottom), then examine whether the dialog is overlapped by keyboard with (frameHeight - distanceFromBottom - selectOptionHeight). Since we already add distanceFromBottom in the first place, there's no need to subtract distanceFromBottom in the examination.\r\n\r\nTwo things are also fixed:\r\n1. Update distance parameter in AppTextSelectionDialog since selection caret has been enlarged for a while.\r\n2. Examine whether selection dialog is overlapped by keyboard in the very end. The original logic adds offset to posTop \"after\" overlapping examination. This may cause a potential bug if adding offset to posTop leads dialog to be overlapped by keyboard."},"comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/149160929","html_url":"https://github.com/mozilla-b2g/gaia/pull/32231#issuecomment-149160929","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32231","id":149160929,"user":{"login":"autolander","id":8754627,"avatar_url":"https://avatars.githubusercontent.com/u/8754627?v=3","gravatar_id":"","url":"https://api.github.com/users/autolander","html_url":"https://github.com/autolander","followers_url":"https://api.github.com/users/autolander/followers","following_url":"https://api.github.com/users/autolander/following{/other_user}","gists_url":"https://api.github.com/users/autolander/gists{/gist_id}","starred_url":"https://api.github.com/users/autolander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autolander/subscriptions","organizations_url":"https://api.github.com/users/autolander/orgs","repos_url":"https://api.github.com/users/autolander/repos","events_url":"https://api.github.com/users/autolander/events{/privacy}","received_events_url":"https://api.github.com/users/autolander/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T09:33:42Z","updated_at":"2015-10-19T09:33:42Z","body":"Running tests\nhttps://treeherder.mozilla.org/#/jobs?repo=gaia&revision=871a256e250226c9b35958fced82a621f784fc57"}}