google.com - Can not insert more than 1 space char in the same focused area
Categories
(Core :: Layout: Form Controls, defect, P2)
Tracking
()
People
(Reporter: rbucata, Assigned: emilio)
References
()
Details
(Keywords: webcompat:contact-ready, webcompat:site-report, Whiteboard: [webcompat-source:product], [wptsync upstream][webcompat:sightline])
User Story
platform:windows,mac,linux impact:annoyance-minor configuration:general affects:all branch:release diagnosis-team:dom
Attachments
(2 files)
Environment:
Operating system: Windows 10
Firefox version: Firefox 127.0.1 (release)/ Firefox Nightly 129.0a1 (2024-07-01)
Preconditions:
- Clean profile
Steps to reproduce:
- Navigate to: https://www.google.com/search?as_st=y&as_q=Ahava+Tzeira+Young+Love+Lemon+Popsicle+7+1987+++++++++++++++++++++++++++++++++++++++++++dvd+cover&as_epq=&as_oq=&as_eq=&imgar=&imgcolor=&imgtype=&cr=&as_sitesearch=&as_filetype=&tbs=&udm=2
- Attempt to insert a space char between characters that already have a space char
- Observe
Expected Behavior:
The space character is introduced
Actual Behavior:
Nothing happens
Notes:
- Reproducible on the latest Firefox Release and Nightly
- Reproduces if a space char is already introduced or if you attempt to insert a second space char after you've already insert one
- Reproducible regardless of the ETP setting
- Works as expected using Chrome
Created from webcompat-user-report:9115a436-3f9f-41dd-b106-82a709fcb6f9
Updated•1 year ago
|
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Happens with any google.com search string with spaces in it, or after you put one space on the end of a search string
Comment 2•1 year ago
|
||
Masayuki, do you mind triage this? I think this relates to editing code..
The <textarea> has white-space:pre-line or white-space:nowrap rule. Therefore, consecutive white-spaces are collapsed. On the other hand, I don't think that white-space-collapse style should be applied in <textarea> nor <input>. So, perhaps, we should specify the style to the anonymous <div> for TextEditor.
Comment 4•1 year ago
|
||
Sounds like at least we could do an intervention, maybe requires a spec change to formalized it?
Trying to fix this...
Hmm, I cannot fix this with updating forms.css because either white-space-collapse: preserve or white-space-collapse: breaks-spaces is valid in <textarea>. So, we need to make the layout module override the style of the anonymous <div>.
Updated•1 year ago
|
Comment 7•1 year ago
|
||
The severity field is not set for this bug.
:tlouw, could you have a look please?
For more information, please visit BugBot documentation.
Comment 8•1 year ago
|
||
Emilio can you have a look at this one, please?
| Assignee | ||
Comment 9•1 year ago
|
||
So... Masayuki, is it correct that what you want to do is basically disallowing "white-space-collapse: collapse" on input / textareas?
If so, you can tweak it here: https://searchfox.org/mozilla-central/rev/964b8aa226c68bbf83c9ffc38984804734bb0de2/servo/components/style/style_adjuster.rs#575
But honestly I think our behavior is reasonable?
Oh, thanks, I've not known the method which overrides the style conditionally.
TextEditor assumes that white-spaces are always preserved and it's reasonable for computing the values and requires to preserve white-spaces and NBSPs as inputted by the user or web app. Therefore, I believe that white-spaces should always be not collapsible and line breaks should always be preformatted in text controls.
On the other hand, we need to preserve the wrapping style which is specified to the text control. That's the reason why I couldn't fix this in forms.css. (At least, the latter is tested by WPT.)
| Assignee | ||
Comment 11•1 year ago
|
||
I'm confused. I tried to tweak the style there, but it's unclear what you'd like the fix to be? I don't see why it needs to be conditional?
| Assignee | ||
Comment 12•1 year ago
|
||
Updated•1 year ago
|
I think that white-space-collapse can be preserve and break-spaces (according to WPT result). Therefore, I think that if the computed value is break-spaces, preserve should not be set.
Comment 14•1 year ago
|
||
Comment 16•1 year ago
|
||
Comment 17•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/53711e5bca1a
https://hg.mozilla.org/mozilla-central/rev/abb00665b017
Updated•1 year ago
|
Works as expected, thank you Emilio!
Updated•1 year ago
|
Description
•