Regression: SVG resized to (0,0)

RESOLVED DUPLICATE of bug 736431

Status

()

Firefox
Untriaged
RESOLVED DUPLICATE of bug 736431
6 years ago
6 years ago

People

(Reporter: Ian, Unassigned)

Tracking

11 Branch
x86_64
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643

Steps to reproduce:

In a page with an SVG element that normally fills the entire containing DIV, the SVG is limited to a small box (~30% wide and ~20% tall) in the upper right-hand corner.  The SVG is created with the current version of jQuery SVG.  jQuery width() and height() report the size of the DIV around the SVG to be full screen (~1100px x 611px), but the SVG itself claims to be 0 wide and 0 high.  (Actual displayed size on screen is larger as indicated above).


Actual results:

SVG is limited to a small portion of the space it normally fills.


Expected results:

SVG should fill the enclosing DIV completely.  This works correctly in Firefox 10.0.2, and was broken after upgrade.  It also fails on a clean install of Firefox 11 on a different computer (both Windows 7 / 64 bit).  SVG works as expected in the current versions of Chrome (Win 7 and Linux Mint).

After using jQuery width() and height() calls to resize the SVG element, it temporarily fills the whole screen.  But any further drawing to the SVG (i.e., adding elements) causes it to shrink back to 0 wide, 0 high.
(Reporter)

Comment 1

6 years ago
Just discovered a workaround -- add this CSS rule:

    svg { width: 100%; height: 100%; }

This was not required in Firefox 10.0.2 and is not required in Chrome, so I would still maintain it's likely to be a bug...

Comment 2

6 years ago
Please provide a public URL or reduced test case that exhibits this issue.
Related to Bug 736431?
Status: UNCONFIRMED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 736431
You need to log in before you can comment on or make changes to this bug.