Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website: in certain browsers/scenarios, pressing [return] in playground editor does not move cursor to next line #49794

Closed
nishanths opened this issue Nov 25, 2021 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@nishanths
Copy link

nishanths commented Nov 25, 2021

What is the URL of the page with the issue?

https://go.dev/play

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15

Screenshot

Scenario 1

Screen Shot 2021-11-25 at 5 40 02 PM

Scenario 2

Screen Shot 2021-11-25 at 5 39 40 PM

What did you do?

  • Visited URL mentioned above.
  • Move cursor to line 10, either using mouse or keyboard.
  • Enter the text type A struct { (scenario 2 only).
  • Press return on keyboard.

What did you expect to see?

Expected cursor to move to line 11.

What did you see instead?

No change in cursor position.

Extra notes

These are illustrative of the scenarios I can reliably reproduce the bug. There may or may not be more scenarios. Note that I was using Safari 15.1 on macOS 12. The issue didn't exist in Chrome. I didn't try other browsers.

@gopherbot gopherbot added this to the Unreleased milestone Nov 25, 2021
@nishanths nishanths changed the title x/website: in certain scenarios, pressing [return] in playground editor does not move cursor to next line x/website: in certain browsers/scenarios, pressing [return] in playground editor does not move cursor to next line Nov 25, 2021
@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 25, 2021
@seankhliao
Copy link
Member

Interesting, I can reproduce this on safari

@seankhliao
Copy link
Member

cc @rsc

@rsc
Copy link
Contributor

rsc commented Nov 30, 2021

Seems to only happen on the very last line of the textarea, and only in Safari. Will dig into it.

@rsc rsc self-assigned this Nov 30, 2021
@gopherbot
Copy link

Change https://golang.org/cl/367975 mentions this issue: _content/js: fix typing blank line at bottom of playground in Safari

@rsc rsc removed their assignment Jun 23, 2022
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
I don't understand why this is necessary, but empirically, it fixes the problem.

Fixes golang/go#49794.

Change-Id: I1258d26d1540a178b864d373038e297c14e8e6ff
Reviewed-on: https://go-review.googlesource.com/c/website/+/367975
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@golang golang locked and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants