{"action":"created","issue":{"url":"https://api.github.com/repos/oetiker/issuetest/issues/104","repository_url":"https://api.github.com/repos/oetiker/issuetest","labels_url":"https://api.github.com/repos/oetiker/issuetest/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/oetiker/issuetest/issues/104/comments","events_url":"https://api.github.com/repos/oetiker/issuetest/issues/104/events","html_url":"https://github.com/oetiker/issuetest/issues/104","id":138023414,"number":104,"title":"ComboBox ignores the scrolling of its parent container (bz#133)\n","user":{"login":"oetiker","id":429279,"avatar_url":"https://avatars.githubusercontent.com/u/429279?v=3","gravatar_id":"","url":"https://api.github.com/users/oetiker","html_url":"https://github.com/oetiker","followers_url":"https://api.github.com/users/oetiker/followers","following_url":"https://api.github.com/users/oetiker/following{/other_user}","gists_url":"https://api.github.com/users/oetiker/gists{/gist_id}","starred_url":"https://api.github.com/users/oetiker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oetiker/subscriptions","organizations_url":"https://api.github.com/users/oetiker/orgs","repos_url":"https://api.github.com/users/oetiker/repos","events_url":"https://api.github.com/users/oetiker/events{/privacy}","received_events_url":"https://api.github.com/users/oetiker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oetiker/issuetest/labels/Component:desktop.layout","name":"Component:desktop.layout","color":"00ff00"},{"url":"https://api.github.com/repos/oetiker/issuetest/labels/Product:framework","name":"Product:framework","color":"000000"},{"url":"https://api.github.com/repos/oetiker/issuetest/labels/Version:0.6-rc1","name":"Version:0.6-rc1","color":"0000ff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-02T23:16:20Z","updated_at":"2016-03-02T23:16:24Z","closed_at":null,"body":"When you place a ComboBox in a container that has a vertical scroll bar (i.e. a BoxLayout) and the position of the scroll bar != &#39;top&#39;, then: when you click the combo, the list of the combobox, is placed in a wrong position, exactly lower than the distance scrolled in the container. Clearly, the scrolling of containers aren&#39;t taken into account when positioning. This bug should be very easy to solve, once is located the place of positioning in the code. This behaviour happens in 0.5.3 and 0.6RC1. Here is a routine that calculates the position of an element, taking into account the scrolling of each parent container, that I used to use successfully: function getAbsolutePosition(el) { var SL = 0, ST = 0; var is_div = /^div$/i.test(el.tagName); if (is_div &amp;&amp; el.scrollLeft) SL = el.scrollLeft; if (is_div &amp;&amp; el.scrollTop) ST = el.scrollTop; var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST }; if (el.offsetParent) { var tmp = arguments.callee(el.offsetParent); r.x += tmp.x; r.y += tmp.y; } return r; }\n\n<table>\n<tbody>\n<tr><td>Product</td><td>framework</td></tr>\n<tr><td>Component</td><td>desktop.layout</td></tr>\n<tr><td>Date</td><td>2006-08-21 14:27:00 +0200</td></tr>\n<tr><td>Reporter</td><td>David Perez (craquerpro)</td></tr>\n<tr><td>Assigned to</td><td>Unassigned (none)</td></tr>\n</tbody>\n</table>\n"},"comment":{"url":"https://api.github.com/repos/oetiker/issuetest/issues/comments/191488536","html_url":"https://github.com/oetiker/issuetest/issues/104#issuecomment-191488536","issue_url":"https://api.github.com/repos/oetiker/issuetest/issues/104","id":191488536,"user":{"login":"oetiker","id":429279,"avatar_url":"https://avatars.githubusercontent.com/u/429279?v=3","gravatar_id":"","url":"https://api.github.com/users/oetiker","html_url":"https://github.com/oetiker","followers_url":"https://api.github.com/users/oetiker/followers","following_url":"https://api.github.com/users/oetiker/following{/other_user}","gists_url":"https://api.github.com/users/oetiker/gists{/gist_id}","starred_url":"https://api.github.com/users/oetiker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oetiker/subscriptions","organizations_url":"https://api.github.com/users/oetiker/orgs","repos_url":"https://api.github.com/users/oetiker/repos","events_url":"https://api.github.com/users/oetiker/events{/privacy}","received_events_url":"https://api.github.com/users/oetiker/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T23:16:24Z","updated_at":"2016-03-02T23:16:24Z","body":"It seems that getPageBoxTop don&#39;t respect the scrolling. I think we should better fix it this way. @David: Can you migrate your idea into DomLocation instead?\n\n<table>\n<tbody>\n<tr><td>Date</td><td>2006-08-31 13:54:40 +0200</td></tr>\n<tr><td>Who</td><td>Sebastian Werner (info)</td></tr>\n</tbody>\n</table>\n"}}