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

new.reddit.com - see bug description #91682

Closed
webcompat-bot opened this issue Oct 29, 2021 · 6 comments
Closed

new.reddit.com - see bug description #91682

webcompat-bot opened this issue Oct 29, 2021 · 6 comments
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-critical
Milestone

Comments

@webcompat-bot
Copy link

webcompat-bot commented Oct 29, 2021

URL: https://new.reddit.com

Browser / Version: Firefox 95.0
Operating System: Windows 10
Tested Another Browser: No

Problem type: Something else
Description: Lag and duplicate clipboard actions in "fancy pants" editor
Steps to Reproduce:
Many people are complaining that typing reddit comments and copy&pasting is quite slow and buggy in Firefox when using the "fancy pants" editor on reddit.com

https://old.reddit.com/r/firefox/comments/qhxcgi/seriously_whats_going_on_with_reddit_performance/
https://old.reddit.com/r/firefox/comments/qdd6qe/typing_reddit_comments_is_extremely_slow/
https://old.reddit.com/r/firefox/comments/pzraho/am_i_the_only_one_who_experience_trouble_by/
https://old.reddit.com/r/firefox/comments/p0zamp/why_reddits_fancy_text_editor_field_is_bugged_in/

Browser Configuration
  • None

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added the action-needsmoderation The moderation has not yet been completed label Oct 29, 2021
@webcompat-bot webcompat-bot added this to the needstriage milestone Oct 29, 2021
@webcompat-bot webcompat-bot added the browser-fixme This requires manual assignment for the browser name label Oct 29, 2021
@webcompat-bot webcompat-bot changed the title In the moderation queue. new.reddit.com - see bug description Oct 29, 2021
@webcompat-bot webcompat-bot added browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-critical and removed browser-fixme This requires manual assignment for the browser name action-needsmoderation The moderation has not yet been completed labels Oct 29, 2021
@denschub
Copy link
Member

Can confirm that this is an issue, moving straight to needsdiagnosis.

@wisniewskit
Copy link
Member

I don't see any noticeable basic performance issues on my macbook, but there are quite serious bugs which could be counted as performance issues for sure (on top of a lot of generally frustrating bugs).

For instance, pasting text at the end of the text-box often causes the page to reload. usually they just do a single HTTP post to a reddit server instead on every paste. (aside: wow, they seem to send a detailed log of each individual paste to their servers, hardcore).

This reload seems to be triggered because there's an exception when running the else-clause in this code:

        if (5 === n.tag || 6 === n.tag) if (Ds(n, t), i) {
          var a = o,
          u = n.stateNode;
          8 === a.nodeType ? a.parentNode.removeChild(u) : a.removeChild(u)
        } else o.removeChild(n.stateNode);

NotFoundError: Node.removeChild: The node to be removed is not a child of this node

I'm not sure why that ends up doing a reload, but it seems as though their error-sentry code is catching the error, and confused into thinking it needs to reload the page to recover.

More oddly, the variable n in the code above contains this info despite me having used ctrl-V to paste:
{ key: "B", "elementType": "br", stateNode: br }

So it seems that their code is not handling line-breaks in an interoperable way, and is treating Chrome/WebKit's contenteditable implementation as de-facto standard. That would make this a dupe of bz1341152. There may also be interop issues with the Selection API and key handling on top of that which aren't as obvious.

This is of course causing other frustrating bugs:

  • sometimes, pressing enter after pasting some text from elsewhere on the page also causes a page reload.
  • text copied from a comment box sometimes cannot be pasted at all, and sometimes has an extra trailing line-break. if there is text highlighted to replace with the paste, it will often be erased, but nothing will be pasted in its place.
  • i've managed to select a full line of text, paste a replacement, and the placeholder text ("what are your thoughts?") appear under whatever is left in the comment box.
  • bolding selected text seems to add a second copy of the text instead, in bold.

If Reddit has been ok with this situation for so long then there isn't much we can do here until all of the related Chrome contenteditable behavior differences can be determined and aligned-upon. Frustrated users can at least either use old Reddit, markdown mode, or the editor in an addon like RES in the meantime, for what little that may be worth to some folks.

@29edde2e
Copy link

29edde2e commented Nov 2, 2021

@spez got any thoughts? 🙃 (worth a try)

@Krutonium
Copy link

@spez got any thoughts? upside_down_face (worth a try)

Call me crazy, but I'm fairly sure that is not Spez's actual account.

@29edde2e
Copy link

29edde2e commented Nov 2, 2021

@spez got any thoughts? upside_down_face (worth a try)

Call me crazy, but I'm fairly sure that is not Spez's actual account.

You are most certainly correct. I was checking LinkedIn to try to find the right person to contact but that site is truly unusable, even with an account. So /shrug I did my best.

@denschub
Copy link
Member

denschub commented Nov 2, 2021

Two additional notes:

There is https://bugzilla.mozilla.org/show_bug.cgi?id=1713831, and I just found out there is an existing internal email thread about this already. There hasn't been a response yet, but that thread is fairly new. I'm confident the linked bug will be updated when there is an update.

Also, while we appreciate y'alls involvement, please note that this is a place of work. I say this, because I know this bug specifically has been linked on Reddit, and I want to avoid getting into a situation where this bug turns into a discussion forum. Reaching out to people responsible for a site is always welcome - but we have to make sure to avoid "spamming" random people or raising the same issue many times with the same people or the same team. That kind of behavior just makes this project feel annoying to developers, and that's the last thing we want to happen. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine priority-critical
Projects
None yet
Development

No branches or pull requests

5 participants