{"action":"closed","issue":{"url":"https://api.github.com/repos/dojo/dojo/issues/291","repository_url":"https://api.github.com/repos/dojo/dojo","labels_url":"https://api.github.com/repos/dojo/dojo/issues/291/labels{/name}","comments_url":"https://api.github.com/repos/dojo/dojo/issues/291/comments","events_url":"https://api.github.com/repos/dojo/dojo/issues/291/events","html_url":"https://github.com/dojo/dojo/issues/291","id":307152899,"number":291,"title":"dijit/Viewport:global variable orientation not defined on ios","user":{"login":"sebastianfrey","id":15965420,"avatar_url":"https://avatars1.githubusercontent.com/u/15965420?v=4","gravatar_id":"","url":"https://api.github.com/users/sebastianfrey","html_url":"https://github.com/sebastianfrey","followers_url":"https://api.github.com/users/sebastianfrey/followers","following_url":"https://api.github.com/users/sebastianfrey/following{/other_user}","gists_url":"https://api.github.com/users/sebastianfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastianfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastianfrey/subscriptions","organizations_url":"https://api.github.com/users/sebastianfrey/orgs","repos_url":"https://api.github.com/users/sebastianfrey/repos","events_url":"https://api.github.com/users/sebastianfrey/events{/privacy}","received_events_url":"https://api.github.com/users/sebastianfrey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-21T08:23:24Z","updated_at":"2018-03-21T13:02:26Z","closed_at":"2018-03-21T13:02:26Z","author_association":"NONE","body":"Hi there,\r\n\r\nSaddly I am not able to submit a ticket at [https://bugs.dojotoolkit.org/newticket#ticket](https://bugs.dojotoolkit.org/newticket#ticket), beacuse the spam mechanismn blocks me. So I submit the issue here, since at the dijit repo no issue section is available and the issue is dijit related. Sry for that. The related dojo version is 1.10.4..\r\n\r\nThe issue is, that DropDown's of dijit/form/FilteringSelect Elements are not shown on iOS. I think, I could nail down the reason for failing on iOS  to dijit/Viewport.getEffectiveBox().\r\n\r\n```js\r\nViewport.getEffectiveBox = function(/*Document*/ doc){\t\r\n\t// summary:\r\n\t//\t\tGet the size of the viewport, or on mobile devices, the part of the viewport not obscured by the\r\n\t//\t\tvirtual keyboard.\r\n\r\n\tvar box = winUtils.getBox(doc);\r\n\r\n\t// Account for iOS virtual keyboard, if it's being shown.  Unfortunately no direct way to check or measure.\r\n\tvar tag = focusedNode && focusedNode.tagName && focusedNode.tagName.toLowerCase();\r\n\tif(has(\"ios\") && focusedNode && !focusedNode.readOnly && (tag == \"textarea\" || (tag == \"input\" &&\r\n\t\t/^(color|email|number|password|search|tel|text|url)$/.test(focusedNode.type)))){\r\n\r\n\t\t// Box represents the size of the viewport.  Some of the viewport is likely covered by the keyboard.\r\n\t\t// Estimate height of visible viewport assuming viewport goes to bottom of screen, but is covered by keyboard.\r\n\t\tbox.h *= (orientation == 0 || orientation == 180 ? 0.66 : 0.40);\r\n\r\n\t\t// Above measurement will be inaccurate if viewport was scrolled up so far that it ends before the bottom\r\n\t\t// of the screen.   In this case, keyboard isn't covering as much of the viewport as we thought.\r\n\t\t// We know the visible size is at least the distance from the top of the viewport to the focused node.\r\n\t\tvar rect = focusedNode.getBoundingClientRect();\r\n\t\tbox.h = Math.max(box.h, rect.top + rect.height);\r\n\t}\r\n\r\n\treturn box;\r\n};\r\n```\r\n\r\nThere is  a peace of code just for iOS included, which takes account for the virtual keyboard on iOS. So if a user hits the FilteringSelect, the above iOS specific peace of code, will be executed. The problem with this peace of code is, that there the global variable `orientation` is referenced directly, but it seems that `orientation` is not supported on Safari in general. [https://caniuse.com/#feat=screen-orientation](https://caniuse.com/#feat=screen-orientation). \r\n\r\nAgain sry for submiting the issue here and thanks for looking into it.\r\n\r\nRegards\r\nSebastian"}}
{"actor":{"display_login":"dylans"}}