{"action":"closed","issue":{"url":"https://api.github.com/repos/twbs/bootstrap/issues/18951","labels_url":"https://api.github.com/repos/twbs/bootstrap/issues/18951/labels{/name}","comments_url":"https://api.github.com/repos/twbs/bootstrap/issues/18951/comments","events_url":"https://api.github.com/repos/twbs/bootstrap/issues/18951/events","html_url":"https://github.com/twbs/bootstrap/issues/18951","id":127706565,"number":18951,"title":"Tooltip bad position onto IE11 enterprise emulation mode IE8","user":{"login":"Lausselloic","id":11272238,"avatar_url":"https://avatars.githubusercontent.com/u/11272238?v=3","gravatar_id":"","url":"https://api.github.com/users/Lausselloic","html_url":"https://github.com/Lausselloic","followers_url":"https://api.github.com/users/Lausselloic/followers","following_url":"https://api.github.com/users/Lausselloic/following{/other_user}","gists_url":"https://api.github.com/users/Lausselloic/gists{/gist_id}","starred_url":"https://api.github.com/users/Lausselloic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lausselloic/subscriptions","organizations_url":"https://api.github.com/users/Lausselloic/orgs","repos_url":"https://api.github.com/users/Lausselloic/repos","events_url":"https://api.github.com/users/Lausselloic/events{/privacy}","received_events_url":"https://api.github.com/users/Lausselloic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/twbs/bootstrap/labels/js","name":"js","color":"ffc40d"},{"url":"https://api.github.com/repos/twbs/bootstrap/labels/v3","name":"v3","color":"d9534f"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-20T15:26:39Z","updated_at":"2016-01-20T21:40:11Z","closed_at":"2016-01-20T21:40:11Z","body":"Hello,\r\n\r\nSeems to be an error into tooltip.js for position evaluation onto IE11 browser in IE8 document mode.\r\nI've not seen this issue opened or fixed. \r\nI've put th sample code onto JSbin with the fix I've made: http://jsbin.com/hopelagiha/1/edit?html,output\r\n\r\nSeems to be a reflow/redraw error of IE8 document mode, the first time the tooltip append in the dom getBoundingClientRect return a wrong left/right position. but the call to getBoundingClientRect invoke a reflow of the dom and the second call works well.\r\n\r\nSo i propose to add a call to getBoundingClientRect() when the first call return a null width Into the function \"Tooltip.prototype.getPosition = function ($element) {\" of tooltip.js :\r\n \r\n.... Line 361 of tooltip.js\r\n      if (elRect.width == null) {\r\n        // Second call to getBoundingClientRect return the good width, only done if the first one failed\r\n        elRect    = el.getBoundingClientRect()   \r\n        // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\r\n        elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\r\n...\r\n\r\n"}}