{"action":"created","issue":{"url":"https://api.github.com/repos/mar10/fancytree/issues/547","repository_url":"https://api.github.com/repos/mar10/fancytree","labels_url":"https://api.github.com/repos/mar10/fancytree/issues/547/labels{/name}","comments_url":"https://api.github.com/repos/mar10/fancytree/issues/547/comments","events_url":"https://api.github.com/repos/mar10/fancytree/issues/547/events","html_url":"https://github.com/mar10/fancytree/issues/547","id":127907338,"number":547,"title":"Don't erase all class names of <li> elements on focusout","user":{"login":"jonimake","id":683669,"avatar_url":"https://avatars.githubusercontent.com/u/683669?v=3","gravatar_id":"","url":"https://api.github.com/users/jonimake","html_url":"https://github.com/jonimake","followers_url":"https://api.github.com/users/jonimake/followers","following_url":"https://api.github.com/users/jonimake/following{/other_user}","gists_url":"https://api.github.com/users/jonimake/gists{/gist_id}","starred_url":"https://api.github.com/users/jonimake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonimake/subscriptions","organizations_url":"https://api.github.com/users/jonimake/orgs","repos_url":"https://api.github.com/users/jonimake/repos","events_url":"https://api.github.com/users/jonimake/events{/privacy}","received_events_url":"https://api.github.com/users/jonimake/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mar10/fancytree/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mar10/fancytree/labels/waiting","name":"waiting","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-21T11:50:00Z","updated_at":"2016-04-08T21:14:07Z","closed_at":"2016-04-08T21:14:07Z","body":"On focusout event (like when you click outside the browser window) nodeRenderStatus function overwrites the class name of \\<li> elements. At least on my end this causes the expanded list item to lose its background colour which is used to indicate the currently open folder.\r\n```\r\n// TODO: we should not set this in the <span> tag also, if we set it here:\r\n// Maybe most (all) of the classes should be set in LI instead of SPAN?\r\nif(node.li){\r\n\tnode.li.className = isLastSib ? cn.lastsib : \"\";\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mar10/fancytree/issues/comments/207608443","html_url":"https://github.com/mar10/fancytree/issues/547#issuecomment-207608443","issue_url":"https://api.github.com/repos/mar10/fancytree/issues/547","id":207608443,"user":{"login":"mar10","id":41663,"avatar_url":"https://avatars.githubusercontent.com/u/41663?v=3","gravatar_id":"","url":"https://api.github.com/users/mar10","html_url":"https://github.com/mar10","followers_url":"https://api.github.com/users/mar10/followers","following_url":"https://api.github.com/users/mar10/following{/other_user}","gists_url":"https://api.github.com/users/mar10/gists{/gist_id}","starred_url":"https://api.github.com/users/mar10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mar10/subscriptions","organizations_url":"https://api.github.com/users/mar10/orgs","repos_url":"https://api.github.com/users/mar10/repos","events_url":"https://api.github.com/users/mar10/events{/privacy}","received_events_url":"https://api.github.com/users/mar10/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T21:14:07Z","updated_at":"2016-04-08T21:14:07Z","body":"Note that 2.17 add a new methods to add/remove/toggleClass().\r\nThese functions set the class on the node's span (or tr) *and* on the node.extraClasses, so it will be persistent"}}