Scrollbar showing for iFrame with overflow:hidden

RESOLVED INVALID

Status

()

Core
Layout
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: m.haque, Unassigned)

Tracking

44 Branch
x86_64
Windows 10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

175 bytes, text/html
Details
(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

Steps to reproduce:

Create a page with the following code and open in Firefox:
<!doctype html>
<html lang="en-GB">
	<head>
		<meta charset="utf-8">
	</head>
	<body>
		<iframe src="https://www.apple.com/" style="overflow:hidden;">
	</body>
</html>


Actual results:

Iframe is showing scrollbar.


Expected results:

Iframe should not show any scrollbar.
(Reporter)

Updated

2 years ago
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64

Comment 1

2 years ago
Created attachment 8720333 [details]
1249009.html

Comment 2

2 years ago
Add scrolling="no".
Component: Untriaged → Layout
Product: Firefox → Core
(Reporter)

Comment 3

2 years ago
If scrolling="no" added then you cannot scroll the iframe anymore using mousewheel or keyboard. On top of that scrolling attribute is not valid for iframe in HTML5.
This was intentionally changed in bug 943249 for compatibility with other browsers
and the HTML spec.

https://html.spec.whatwg.org/multipage/rendering.html#the-page
"If the Document is in a nested browsing context, and the browsing context container of that nested browsing context is a frame or iframe element, and that element has a scrolling attribute, and that attribute's value is an ASCII case-insensitive match for the string "off", "noscroll", or "no", then the user agent is expected to prevent any scroll bars from being shown for the viewport of the nested browsing context, regardless of the 'overflow' property that applies to that viewport."
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
(Reporter)

Comment 5

2 years ago
So there is no way in Firefox to hide scrollbar but keep iframe scrollable using mousewheel or keyboard.
Not that I know of, no.  But the same is true for other browsers, right?
You need to log in before you can comment on or make changes to this bug.