Minor GUI unexpected cmd + right behaviour


(Caue Rego) #1

Quite annoying nuance.

  1. Get a chrome on mac (may not be necessary step).
  2. Go to meta.discourse.org
  3. Navigate. Go back. Have some “forward history” in your stack.
  4. Start writing a post.
  5. Hit CMD + K, add a link. --> this is where the bug happens
  6. Hit CMD + Right Arrow, you know, to go to the end of line.
  7. Do it fast enough, and you may(*) lose your latest edits to a forwarded browser

(*) - happened quite often on my tests, in my current terrible internet at home.


(Alan Tan) #2

Hmm I can’t repro even thought I’m toggling between CMD + Left Arrow or CMD + Right Arrow really fast.

When the page gets forwarded, did the input field lose focus?


(Caue Rego) #3

Yeah, the input field sure loses focus, and maybe that’s indeed the bug, even if the most annoying part is losing unsaved data. Should I edit and include that info?


(Alan Tan) #4

If the input lost focus then we need to figure out why it happened :smile: The input field doesn’t lose focus for me using the current repro steps :smile:


(Caue Rego) #5

Well, for me it happens even in incognito, 100% of times. And there’s nothing on the console log. How could I debug this? Are you sure it’s not a bug on you on top of this bug? :stuck_out_tongue:

On Safari it doesn’t happen, but there are some errors on the console… Not sure if they’re related, though. Too lazy to read:

[lazy]

[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: no-repeat (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Unexpected CSS token: : (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 4)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Warning] Invalid CSS property declaration at: * (desktop_8fd83b6557b7c03ba428fb021347a083251f1d03.css, line 7)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (select2.png, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (html-sanitizer-bundle-d248c5e7fffd65438fab42fafa3d1d56.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (vendor-75453144fb0f3b6c16c7862399ef47bf.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (preload_store-d16a3675434b5a0043157cfc2b850471.js.map, line 0)

[/lazy]


(Jeff Atwood) #6

I can repro this in Windows / Chrome – the editor loses focus for me after I insert a link with ctrl+k.

That’s the specific problem, not the other irrelevant stuff downstream of it… can you fix that @eviltrout?


(Alan Tan) #7

Ok I had a look and it seems like the composer is not re-focused after adding text from the modals. This means that you’ll run into the same problem when inserting emojis from the modal as well.

https://github.com/discourse/discourse/pull/3901


Composing post keyboard shortcuts just stopped working!
(Alan Tan) #8