{"action":"created","issue":{"url":"https://api.github.com/repos/HubSpot/drop/issues/55","labels_url":"https://api.github.com/repos/HubSpot/drop/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/HubSpot/drop/issues/55/comments","events_url":"https://api.github.com/repos/HubSpot/drop/issues/55/events","html_url":"https://github.com/HubSpot/drop/issues/55","id":59654472,"number":55,"title":"Popover has wrong x position (reproducible, with example)","user":{"login":"henrik","id":216,"avatar_url":"https://avatars.githubusercontent.com/u/216?v=3","gravatar_id":"","url":"https://api.github.com/users/henrik","html_url":"https://github.com/henrik","followers_url":"https://api.github.com/users/henrik/followers","following_url":"https://api.github.com/users/henrik/following{/other_user}","gists_url":"https://api.github.com/users/henrik/gists{/gist_id}","starred_url":"https://api.github.com/users/henrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrik/subscriptions","organizations_url":"https://api.github.com/users/henrik/orgs","repos_url":"https://api.github.com/users/henrik/repos","events_url":"https://api.github.com/users/henrik/events{/privacy}","received_events_url":"https://api.github.com/users/henrik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HubSpot/drop/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-03T15:09:27Z","updated_at":"2015-05-12T03:26:39Z","closed_at":null,"body":"Steps to reproduce:\r\n\r\n* Visit <http://nyh.name/signup.html> (static copy of a real site, to catch the bug). I can see the issue in Chrome, Firefox, Safari on OS X.\r\n* Input \"foo@gmale.com\" (sic) into the email field\r\n* Hit \"tab\" or click the \"Password\" field\r\n\r\nExpected a centered drop:\r\n\r\n![](https://s3.amazonaws.com/f.cl.ly/items/0m2A1J0T1m2X1N3v282h/Image%202015-03-03%20at%203.59.01%20pm.png)\r\n\r\nBut I get a non-centered drop:\r\n\r\n![](https://s3.amazonaws.com/f.cl.ly/items/0u0W3p443J1o211w1z1y/Image%202015-03-03%20at%203.58.50%20pm.png)\r\n\r\nHowever, if you hit shift+tab, then tab (or click the email field and then back to the password field), the drop is `close()`d and re`open()`ed and then becomes correctly centered.\r\n\r\nI started debugging this a bit, but it wasn't obvious to me, and I figured you guys might have some insight.\r\n\r\nThe interesting parts of the CoffeeScript for that logic is basically (simplified – you can see [the full non-minified JS here](http://nyh.name/signup_files/public_responsive-211efb34244fad1bebc3c4b909de3641.js)):\r\n\r\n``` coffeescript\r\n  currentSuggestion = null\r\n\r\n  # Show content on email blur.\r\n  $field.blur ->\r\n    $(this).mailcheck EMAIL_DOMAINS,\r\n      suggested: ($element, suggestion) ->\r\n        currentSuggestion = suggestion\r\n        drop.close()  # So `open()` actually calls `content()` again.\r\n        drop.open()\r\n\r\n      empty: ($element) ->\r\n        drop.close()\r\n\r\n  # The tooltip content.\r\n  # Drop.js calls this method every time before it `open()`s.\r\n  content = (_) ->\r\n    return unless currentSuggestion\r\n    currentSuggestion.someValue\r\n   \r\n  # Must be called after `content` is defined.\r\n  drop = new Drop\r\n    classes: \"drop-theme tooltip tooltip--red\"\r\n    target: $field[0]\r\n    content: content\r\n    openOn: null\r\n    position: \"bottom center\"\r\n```"},"comment":{"url":"https://api.github.com/repos/HubSpot/drop/issues/comments/101115946","html_url":"https://github.com/HubSpot/drop/issues/55#issuecomment-101115946","issue_url":"https://api.github.com/repos/HubSpot/drop/issues/55","id":101115946,"user":{"login":"geekjuice","id":1654587,"avatar_url":"https://avatars.githubusercontent.com/u/1654587?v=3","gravatar_id":"","url":"https://api.github.com/users/geekjuice","html_url":"https://github.com/geekjuice","followers_url":"https://api.github.com/users/geekjuice/followers","following_url":"https://api.github.com/users/geekjuice/following{/other_user}","gists_url":"https://api.github.com/users/geekjuice/gists{/gist_id}","starred_url":"https://api.github.com/users/geekjuice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geekjuice/subscriptions","organizations_url":"https://api.github.com/users/geekjuice/orgs","repos_url":"https://api.github.com/users/geekjuice/repos","events_url":"https://api.github.com/users/geekjuice/events{/privacy}","received_events_url":"https://api.github.com/users/geekjuice/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T03:26:39Z","updated_at":"2015-05-12T03:26:39Z","body":"@henrik Sorry for the delay. Is this still and issue with the new versions of `Drop` and `Tether`? Having trouble reproducing the issue these days and wondering if it was still an issue on your end as well.\r\n\r\nIf so, it'd be great if you could share a jsFiddle or Codepen so I can debug the issue a little more easily. Thanks :smiley_cat: "}}