Title: Automatic scrolling / text based answer
Last modified: January 2, 2023

---

# Automatic scrolling / text based answer

 *  Resolved [adriandambrine](https://wordpress.org/support/users/adriandambrine/)
 * (@adriandambrine)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/)
 * Hi, 
   There is an automatic scroll when several text based answers questions are
   set on a quiz. The screen automatically scroll from the first text based answer
   to the next. How can I correct that ?
 * Thank you
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fautomatic-scrolling-text-based-answer%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Harmonic Design](https://wordpress.org/support/users/harmonic_design/)
 * (@harmonic_design)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/#post-16336329)
 * Hi adriandambrine,
   I am unable to replicate this on your site using Chrome, Chromium,
   Firefox, or Epiphany (same render engine as Safari) on either Linux or Windows.
 * Right now, I have two guesses.
 * First, are you pressing ENTER or TAB? Enter is used to “submit” an input, while
   TAB will always automatically select and _focus_ the next available input. This
   is not an HD Quiz thing – this is how forms work on browsers. For example, if
   you reload the page and keep pressing TAB, you will see each possible input highlight
   and the page automatically scroll that input into view.
 * If the issue is not that you are tabbing inputs, then my best guess is that this
   is OS/browser related behaviour. Whatever setup you have probably forces (note:
   it is NOT HD Quiz doing this. It’s your browser) the next text input on ENTER
   key even though this is only ever supposed to happen if you press the TAB key.
 * If this is the case, the only recommendations I can provide are:
    1. Try a different browser. If the issue does not occur in other browsers then 
       we at least know that the issue is specific to your default browser.
    2. Check your list of browser extensions. Maybe it is a browser extension that 
       is forcing this behaviour for you
 * Hope this all makes sense and at least helps point us in the right direction!
 *  Thread Starter [adriandambrine](https://wordpress.org/support/users/adriandambrine/)
 * (@adriandambrine)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/#post-16336452)
 * Thank you for your comprehensive answer.
 * This issue appear on android phones, on chrome, edge or opera (or facebook browser).
 * I tried it on a safari brower on iphone, it does not happen.
 *  Plugin Author [Harmonic Design](https://wordpress.org/support/users/harmonic_design/)
 * (@harmonic_design)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/#post-16336538)
 * This was one of the weirdest rabbit holes I’ve been down in a while.
 * So first, I’ve been unable to fully track down _where_ this code/logic is coming
   from on your site, but I’m 99% sure that this is the issue. You can skip to the
   end if you don’t care about the explanation.
 * For mobile, there is an open HTML standard called `enterkeyhint` that tells mobile
   browsers which keyboard to open when an input field is focused. It’s mainly used
   for things like opening up the “number only” keyboard if the input takes in numbers
   only.
 * What I’m pretty sure is happening on your site is that some other plugin, or 
   perhaps your theme, is setting all inputs to set the `enterkeyhint` value to `
   next`. What this means is that when you press the ENTER key, the browser auto
   focuses the next available input. Super useful on mobile for things like filling
   out forms – not desirable at all for something like a quiz.
 * **How to fix**
 * You will need to make a super small edit to the plugin files. But the good news
   is that if we confirm this works for you, then this is something I can actually
   include in HD Quiz directly so that if any other/future users ever have the same
   issue – well it won’t be an issue 🙂
 * If you edit `./hd-quiz/includes/templates/text.php` on line `33` you will see
   where the text input is printed out. If you add the following just before the
   closing `/>` the issue _should_ be fixed for you. The code to add is `enterkeyhint
   ="done"`.
 * If this still does not work, then it means that whatever script is running on
   your site that sets this to next is far more aggressive than I thought – but 
   we still have a couple options to try if it comes to that.
 * Please A) let me know if you need help doing the above, and B) please let me 
   know if it works!
 *  Thread Starter [adriandambrine](https://wordpress.org/support/users/adriandambrine/)
 * (@adriandambrine)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/#post-16337315)
 * Before all, thank you for your answer.
 * I does seem to work ! You are brilliant.
 * I’ll warn you if there is something defaulting

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Automatic scrolling / text based answer’ is closed to new replies.

 * ![](https://ps.w.org/hd-quiz/assets/icon-256X256.gif?rev=2936040)
 * [HD Quiz](https://wordpress.org/plugins/hd-quiz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hd-quiz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hd-quiz/)
 * [Active Topics](https://wordpress.org/support/plugin/hd-quiz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hd-quiz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hd-quiz/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [adriandambrine](https://wordpress.org/support/users/adriandambrine/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/automatic-scrolling-text-based-answer/#post-16337315)
 * Status: resolved