Open Bug 1589164 Opened 5 years ago Updated 2 years ago

HTML container scrolls to top when its size is smaller than a SVG and one element is focused using mouse or tab navigation

Categories

(Core :: SVG, defect, P3)

69 Branch
defect

Tracking

()

Tracking Status
firefox-esr60 --- wontfix
firefox-esr68 --- wontfix
firefox69 --- wontfix
firefox70 --- wontfix
firefox71 --- wontfix

People

(Reporter: arellano.nvs, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file scroll-firefox-issue(1).html (deleted) —

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

Steps to reproduce:

This issue has been observed while scrolling down to focus one of a SVG elements. Once a SVG element gains focus, html container holding the SVG, scrolls to top creating an awful user experience.

Prerequisites:

1.- Have a SVG inside a HTML container
2.- SVG elements shall be focusable ( tabindex="0" )
3.- HTML container size shall be smaller than SVG

Steps to reproduce ( Scenario 1 ):

1.- Launch a web page on latest version of Firefox ( i.e.: 69.0.3 )
2.- Scroll down to the bottom and press any SVG element ( i.e.: BUTTON2 )

Steps to reproduce ( Scenario 2 ):

1.- Launch a web page on latest version of Firefox ( i.e.: 69.0.3 )
2.- Scroll down to bottom and press any SVG element other than the last one ( i.e.: BUTTON1 ); container will scroll up.
3.- Scroll down until focused element is visible and press "tab" key.

Actual results:

SVG element is focused, but HTML container is scrolling to top losing the original position

Expected results:

SVG element is focused, so HTML container remains in the same position, even when it contains a scrollbar.

Thanks for the bug report. I agree that we shouldn't be scrolling to the position of the inline <svg> element (which is what I think is happening, if I insert a sibling <p> element just before the <svg>).

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Has Regression Range: --- → yes
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: