{"issue":{"milestone":null,"user":{"id":1268966,"login":"arosolino","url":"https://api.github.com/users/arosolino","avatar_url":"https://secure.gravatar.com/avatar/6f9f06e3e29d31042c07a5aa4443bb22?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6f9f06e3e29d31042c07a5aa4443bb22"},"title":"setValue() old height sometimes doesn't change","created_at":"2011-12-17T20:04:10Z","labels":[],"updated_at":"2011-12-17T20:07:37Z","state":"open","id":2590271,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/marijnh/CodeMirror2/issues/297","closed_at":null,"body":"There is a bug with the setValue() function, I use it to load in new files via Ajax. If the file previously loaded had scroll contents, and I load new contents in sometimes the scroll remains intact, however the gutter is correct.\r\n\r\nHere is an example of the first file I load with the scroll bar:\r\nhttp://gyazo.com/e093fa6d17c51f179e108b333c668716\r\n\r\nOnce I load ajax the next function and load it with setValue, this is what happens.\r\nhttp://gyazo.com/3145f9a32a4bcc0c79a598ad72a61dc2\r\n\r\nSee the scroll bar remains intact, here is some of the code inspected:\r\nhttp://gyazo.com/8a94a194dd754c93385689e46ed6d68c\r\n\r\nLook at the difference in heights, gutter is set to 300 and the other div is set to 1018.\r\n\r\nAlso this doesn't happen every time, it's like 1/3 times.","number":297,"url":"https://api.github.com/repos/marijnh/CodeMirror2/issues/297","comments":1,"assignee":null},"comment":{"user":{"id":1268966,"login":"arosolino","url":"https://api.github.com/users/arosolino","avatar_url":"https://secure.gravatar.com/avatar/6f9f06e3e29d31042c07a5aa4443bb22?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"6f9f06e3e29d31042c07a5aa4443bb22"},"created_at":"2011-12-17T20:07:37Z","updated_at":"2011-12-17T20:07:37Z","id":3191205,"body":"Just a side note, it seems the bug lies when setting this \"code.style.\"","url":"https://api.github.com/repos/marijnh/CodeMirror2/issues/comments/3191205"},"action":"created"}