fix bug caused by not setting the currently selected node
fix bug caused by not setting the currently selected node

also, some JSHint cleanup

citation-style-editor/csl-editor,fbennett/csl-editor,citation-style-editor/csl-editor,citation-style-language/csl-editor,fbennett/csl-editor,adam3smith/csl-editor,adam3smith/csl-editor,citation-style-editor/csl-editor,adam3smith/csl-editor,citation-style-language/csl-editor,citation-style-language/csl-editor