oppia / oppia

A free, online learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
5.63k stars 3.78k forks source link

[BUG]: Input Text Box Requires Multiple Clicks to Regain Focus #20187

Closed amaanlari closed 3 weeks ago

amaanlari commented 3 weeks ago

Describe the bug

On the Exploration editor page, at the time of adding a response element in Text Input interaction, the input text box requires multiple clicks to enter text after each character input. The input text box losses focus after every single character is entered and the user has to click on the input box to regain the focus to type further.

URL of the page where the issue is observed.

N/A

Steps To Reproduce

  1. Go to creator dashboard. Click Create Exploration button.
  2. Click on the card and add content to the exploration and click Save content button.
  3. Add interaction for the exploration. Click on Add Interaction button.
  4. A modal for choosing Interaction type will appear.
  5. Choose the Text Input interaction from the modal.
  6. Add a placeholder (Optional) and click on Save interaction button.
  7. Add response modal appears.
  8. Click on add element. Input text box will appear.
  9. Enter the content in the text box.
  10. The text box will loose focus after the first character is entered.
  11. Click again on the input text box and enter another text.
  12. This happens each time user enters any character in the input text box.

Expected Behavior

The input box does not accept input until it is clicked again. instead it should work without extra clicks. The input text box should take the whole content without loosing the focus from the text box and not requiring the user to click again and again after each character input.

Screenshots/Videos

https://github.com/oppia/oppia/assets/121742871/ebc569cd-bbd1-40b6-b21e-2184c7c2feb3

What device are you using?

Desktop

Operating System

Linux

What browsers are you seeing the problem on?

Chrome

Browser version

Version 124.0.6367.60 (Official Build) (64-bit)

Additional context

The main issue lies in the Add response modal. The input text box seems to have some bug most likely in the front end part. PS: This bug is present in the production as well.

Tips for developers

Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).

Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).

Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!

rahat2134 commented 3 weeks ago

This issue is already open. Please check existing issues before creating a new one.

amaanlari commented 3 weeks ago

@rahat2134 Yeah the issue is similar.