Disabling @-moz-document results in users being unable to enter line-breaks into YouTube comments

NEW
Unassigned

Status

()

Core
CSS Parsing and Computation
a month ago
4 days ago

People

(Reporter: denschub, Unassigned)

Tracking

({regression})

unspecified
regression
Points:
---

Firefox Tracking Flags

(firefox57 unaffected, firefox58 unaffected, firefox59 wontfix)

Details

(URL)

(Reporter)

Description

a month ago
So, this is weird.

STR:

1. Open any YouTube video
2. Log in
3. Type a comment and try to add a line break

Expected result:

Line break is inserted.

Actual result:

Space is added, no line break. When submitting the comment, however, it will result in a line break being added.
(Reporter)

Comment 1

a month ago
This is fallout from bug 1035091, where we decided to no longer allow @-moz-document to be used. Toggling `layout.css.moz-document.content.enabled` makes the line breaks appear again.

Given it only affects 59 and since there is still a lot of time left in that train, we might be able to resolve this by doing outreach. I'll do some diagnosis on their CSS and see if I can come up with a solution for YouTube. Still, requesting tracking as a 59 regression, it's YouTube after all.
Blocks: 1035091
status-firefox57: --- → unaffected
status-firefox58: --- → unaffected
status-firefox59: --- → affected
tracking-firefox59: --- → ?
Keywords: regression
(Reporter)

Comment 2

a month ago
So, thanks for the YouTube folks for leaving the comment in.

> <style>
>   /*
>    * TODO(b/38247967): Firefox doesn't break line correctly when white-space is
>    * set to normal. Remove this hack once the variable is removed from
>    * paper-dropdown-menu's  mixin.
>    */
>   @-moz-document url-prefix() {
>     textarea {
>       --paper-input-container-input_-_white-space pre-wrap;
>     }
>   }
> </style>

Which is, indeed, true. For <textarea>s that have `white-space: normal;`, we display a space instead of a line break. Not too sure what we are supposed to do, though. Will continue looking into it...
(Reporter)

Comment 3

a month ago
This is bug 1386100, basically. Worth nothing that according to the spec, we are doing the right thing, while Chrome always behaves like `pre-wrap`, even if something different is set. Even `nowrap` does not alter the behavior in Chrome. I consider that an issue and will follow-up on the issue mentioned before.

As for YouTube, I don't really see why it is necessary to add `white-space: normal;` in the first place, but when reading the comment, this seems to have a framework issue linked to it, so maybe they simply cannot not set it. However, since Chrome behaves the same way anyway, I'd suggest adding `pre-wrap` for all browsers. If that's not an option, they have to come up with a different solution of serving CSS for Firefox only, but I doubt this is necessary here. This seems to be the only use of @-moz-document I could find, but it's probably worth generally highlighting that.

Adam, do you want to do the mailing with YouTube people or do you prefer me doing it? :)
Flags: needinfo?(astevenson)
See Also: → bug 1386100
This Is Just To Say

I have tracked
the bug 
that was not in
Firefox 59 

and which
you are probably
hoping
will be fixed by YouTube

Forgive me
but as a poet I really like line breaks and white space
so sweet
and so much like code
tracking-firefox59: ? → +
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #4)
> This Is Just To Say
> 
> I have tracked
> the bug 
> that was not in
> Firefox 59 
> 
> and which
> you are probably
> hoping
> will be fixed by YouTube
> 
> Forgive me
> but as a poet I really like line breaks and white space
> so sweet
> and so much like code

Lol :)

Just wanted to add that @-moz-document is not going to be disabled on late beta / release, so not sure if it needs tracking.
Flags: needinfo?(astevenson)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #5)
> 
> Just wanted to add that @-moz-document is not going to be disabled on late
> beta / release, so not sure if it needs tracking.

But we're hoping for 59?
Flags: needinfo?(emilio)
Not necessarily, no, until all the relevant regressions are fixed.
Flags: needinfo?(emilio)

Updated

4 days ago
status-firefox59: affected → wontfix
tracking-firefox59: + → ---
You need to log in before you can comment on or make changes to this bug.