{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/52","labels_url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/52/comments","events_url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/52/events","html_url":"https://github.com/GoogleChrome/dialog-polyfill/issues/52","id":88268410,"number":52,"title":"Dialogs should only be centered when shown modally","user":{"login":"samthor","id":119184,"avatar_url":"https://avatars.githubusercontent.com/u/119184?v=3","gravatar_id":"","url":"https://api.github.com/users/samthor","html_url":"https://github.com/samthor","followers_url":"https://api.github.com/users/samthor/followers","following_url":"https://api.github.com/users/samthor/following{/other_user}","gists_url":"https://api.github.com/users/samthor/gists{/gist_id}","starred_url":"https://api.github.com/users/samthor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samthor/subscriptions","organizations_url":"https://api.github.com/users/samthor/orgs","repos_url":"https://api.github.com/users/samthor/repos","events_url":"https://api.github.com/users/samthor/events{/privacy}","received_events_url":"https://api.github.com/users/samthor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-14T23:41:44Z","updated_at":"2015-12-20T12:23:48Z","closed_at":"2015-06-18T00:39:35Z","body":"When dialogs are modal, they are put into the top layer. When they're not, they should be positioned using [normal alignment, as per the spec](http://www.w3.org/html/wg/drafts/html/master/semantics.html#normal-alignment).\r\n\r\nCurrently, we try to position them in the center no matter what.\r\n\r\nChrome's native implementation (as of M43) mostly does this. Dialogs shown normally are just positioned as per the user agent CSS. However, if a dialog is shown modally, closed, and then shown again, it's still centered: _this_ is a bug."},"comment":{"url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/comments/166113083","html_url":"https://github.com/GoogleChrome/dialog-polyfill/issues/52#issuecomment-166113083","issue_url":"https://api.github.com/repos/GoogleChrome/dialog-polyfill/issues/52","id":166113083,"user":{"login":"Garbee","id":868301,"avatar_url":"https://avatars.githubusercontent.com/u/868301?v=3","gravatar_id":"","url":"https://api.github.com/users/Garbee","html_url":"https://github.com/Garbee","followers_url":"https://api.github.com/users/Garbee/followers","following_url":"https://api.github.com/users/Garbee/following{/other_user}","gists_url":"https://api.github.com/users/Garbee/gists{/gist_id}","starred_url":"https://api.github.com/users/Garbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Garbee/subscriptions","organizations_url":"https://api.github.com/users/Garbee/orgs","repos_url":"https://api.github.com/users/Garbee/repos","events_url":"https://api.github.com/users/Garbee/events{/privacy}","received_events_url":"https://api.github.com/users/Garbee/received_events","type":"User","site_admin":false},"created_at":"2015-12-20T12:23:48Z","updated_at":"2015-12-20T12:23:48Z","body":"I'm not sure which is newer exactly (since keeping up with specs is difficult) but the [Candidate Recommendation](http://www.w3.org/TR/2013/CR-html5-20130806/interactive-elements.html#set-up-the-default-static-position) of HTML5 shows that the dialog should only have *two* modes. This means normal dialogs should also get centered like modals from what I can tell.\r\n\r\nMight be reading incorrectly or could just be outdated, but maybe something to look into again here."}}