Responsive Design Mode should honor OS-level scrollbar setting for textareas
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(Not tracked)
People
(Reporter: stephenmerriman, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rdm-reserve])
Attachments
(3 files, 3 obsolete files)
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
I can reproduce on macOS. This may be related to other viewport-related work underway in Bug 1504659.
Reporter | ||
Comment 6•6 years ago
|
||
Oddly enough, I believe the view in responsive mode may be correct, and is the normal view that is incorrect. If you use the textarea rows="x" format, you will always see x+1 rows normally, and x rows in responsive mode.
Comment 7•6 years ago
|
||
I can no longer reproduce this. Is it still occurring for you?
Reporter | ||
Comment 8•6 years ago
|
||
Yes, I'm still getting exactly the same behavior.
Comment 9•6 years ago
|
||
(In reply to stephenmerriman from comment #8)
Yes, I'm still getting exactly the same behavior.
I'm still not able to reproduce the buggy behavior. Is the bug happening for you in Nightly? If so, please try also in Nightly with a new profile.
If it's still occurring, please attach a screen capture so I can see if there are any special steps I need to take.
Reporter | ||
Comment 10•6 years ago
|
||
Have just downloaded Nightly for the first time. Here are the results:
https://www.youtube.com/watch?v=ImNhGnYStXE&feature=youtu.be&hd=1
Comment 11•6 years ago
|
||
Please try loading this attachment. Based on your screen recording, I think you will be seeing these results:
Before RDM) Textarea rows = 3
After RDM) Textarea rows = 2
If that's what's happening, then we've got some kind of style substitution happening in your browser on the initial load. The default rows for a textarea in Firefox is 2, and that's what you should be getting on the initial load.
Also, testing with a clean profile requires you to create a new profile. Nightly will use the same profile you were already using. Here's how to create an use a new, clean profile: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Multiple_profiles
Reporter | ||
Comment 12•6 years ago
|
||
No, it says 2 both times.
The very first page of Nightly (seen in video) says "This installation of Nightly has a new profile.", and I can confirm it wasn't using the same profile as normal.
However, have created another new profile, with exactly the same results.
Comment 13•6 years ago
|
||
Thank you for your patience. Okay, looking more carefully at your recording, when you are leaving RDM mode, I can see the textarea snap to a slightly larger size which is then the size of the textarea shown in the regular window. The difference in area is not proportional. It's about the same amount added to both the height and width. That indicates to me that this is related to your OS-level scrollbar settings (which of course aren't affected by Firefox profiles).
On macOS, when I switch my scrollbar preferences to be always displayed, I get the same behavior as you are getting. This is why I was able to replicate the bug some time ago. I've since switched my scrollbar settings and therefore couldn't reproduce it. I don't know exactly what the Windows preference setting looks like, but there's probably a way for you to choose overlay scrollbars which will give you a 2 row textarea initially.
I'll update my attachment to make this more clear. The update will set overflow: auto and wrap=off. That will show the vertical scrollbar in Firefox, and both scrollbars in Chrome.
Regardless of the cause, certainly RDM should display the text area in the same way. It appears that RDM is forcing overlay scrollbars for textareas. I've retitled the bug to make the issue more explicit.
Comment 14•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 15•5 years ago
|
||
Looking into this as I'm currently working Bug 1509202, whose issue is very similar to this. Although I believe the one potential fix for this may be easier.
When RDM's content frame script is started, we apply a stylesheet to the document that will show overlay scrollbars for all elements, except for <select>
. This explains why overlay scrollbars are being forced on <textarea>
, so solving this particular issue may be as simple as including it to the :*not()
selector list.
Updated•5 years ago
|
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
(In reply to Micah Tigley [:mtigley] from comment #15)
Looking into this as I'm currently working Bug 1509202, whose issue is very similar to this. Although I believe the one potential fix for this may be easier.
When RDM's content frame script is started, we apply a stylesheet to the document that will show overlay scrollbars for all elements, except for
<select>
. This explains why overlay scrollbars are being forced on<textarea>
, so solving this particular issue may be as simple as including it to the:*not()
selector list.
This sounds like the right fix. I think we need to consider making this behavior (forced overlay vs not) toggle-able in RDM. Here's my reasoning: often users want to simulate a mobile device, in which case imposing overlay scrollbars is appropriate. But occasionally they just want to see their content at different window sizes, in which case we should honor the OS-level scrollbar preference. We need to keep both use cases viable. I think the most sensible way to do it is to add an additional override behavior to our "Touch Simulation" UI widget. When that widget is on, then overlay scrollbars are forced on. When it is off, we display textarea scrollbars as the OS settings dictate.
Doing this will require changes to several code areas, including manager.js updateTouchSimulation(), and in nsDocShell. The style toggle could be accomplished, I suppose, with an additional "!important" style declaration for the forced overlay scrollbars. So I think attachment 9071698 [details] will be part of the solution, but not enough to support all use cases.
Comment 18•5 years ago
|
||
But occasionally they just want to see their content at different window sizes, in which case we should honor the OS-level scrollbar preference. We need to keep both use cases viable. I think the most sensible way to do it is to add an additional override behavior to our "Touch Simulation" UI widget. When that widget is on, then overlay scrollbars are forced on. When it is off, we display textarea scrollbars as the OS settings dictate.
This a good point. I jumped ahead of myself assuming a fix that's really only appropriate for mobile devices. And I agree toggling the overlay scrollbars in the Touch Simulator is the best place the put this. I'll update the above patch to include this solution.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Updated•2 years ago
|
Description
•