[hide preview] not working if not signed in

asked 2014-01-05 07:37:43 -0500

apg gravatar image

updated 2014-01-05 07:38:04 -0500

When you are not signed in and start answering a question, you see [hide preview] text just above the preview area. But clicking on [hide preview] does not actually hide preview, which is confusing.

I came up with the following fix. In templates/question/javascript.html, I changed

    if ((askbot['data']['threadIsClosed'] === false) && askbot['data']['userIsAuthenticated']) {
        initEditor();
    }

to

if (askbot['data']['threadIsClosed'] === false) {
    initEditor();
}

Do you think this does not break other things?

edit retag flag offensive close merge delete