Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
594 views
in Q2A Core by

Just came across one issue that was once discussed here in the forum.

If there is a question with many comments, yet no answer, the answer textarea (ckeditor) is shown by default. If the user clicks on the "Answer" button q2a just hides the textarea of the answer... Problem: The user clicks the button and nothing happens for him (he does not see that there is something going on on the bottom of the page, i.e. the answer field gets hidden).

Do things better: Scroll down to the textarea!

To scroll down after the "Answer" button has been hit, you need to modify the file question.js:

    if (e && (qa_element_revealed==e)) {
        // switched off: dont hide answer field rather scroll to it
        //qa_conceal(qa_element_revealed, 'form');
        //qa_element_revealed=null;
        $('html, body').animate({scrollTop:$('#cke_a_content').position().top}, 'slow');
    }

This solution works if you have jquery loaded in the background.

 

PS: I always wondered why gidgreen implemented a show-hide-toggle for the answer button. Why should a user want to hide the answer's textarea again?

Q2A version: 1.6.1

Please log in or register to answer this question.

...