New issue
Advanced search Search tips

Issue 838008 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 908271
Owner: ----
Closed: Dec 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Infinite calling load event when dynamically loading objects with position: absolute

Reported by dean...@hotmail.com, Apr 29 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134

Steps to reproduce the problem:
1. Dynamically create an object in javascript
2. Attach to a parent div
3. Setup an event listener for the load event
4. In the load event set the properties of the object to display: absolute
5. The load event will then fire indefinitely

What is the expected behavior?
Only fire the load event once.

What went wrong?
Chrome repeatedly calls the load event

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 66.0.3359.139  Channel: n/a
OS Version: 10.0
Flash Version: 

For details and a fiddle see: https://stackoverflow.com/questions/50019134/chrome-object-tags-load-multiple-times-when-setting-style-position-absolute
 
ChromeEventBug.html
987 bytes View Download

Comment 1 by woxxom@gmail.com, Apr 29 2018

First time broken in 48.0.2532.0 - "load" is fired twice
d1a7b0cbd0a511459f0f6202dfe61e27aa47df46 = https://crrev.com/1384973004 by nainar@chromium.org
"Forward assigning to style on HTMLElement, SVGElement and CSSStyleRule to style.cssText"

Second time broken in 59.0.3048.0 - "load" is fired infinitely
0c51a5fdf9f27c4758e4ae2b2b54dff2b8890181 = https://crrev.com/2759063002 by joelhockey@chromium.org
"Remove most of Widget (FrameViewBase) class from HTMLPlugInElement."

Labels: Needs-Triage-M66
Labels: Triaged-ET M-68 FoundIn-68 Target-68 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 17.10 using chrome reported version #66.0.3359.139 and latest canary #68.0.3415.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Components: -Blink>DOM Blink>CSS
A few more details. If I run content_shell --run-layout-tests it is called twice. If I just run it without arguments, it is called in a loop.

The load is event is being triggered by adjusting the style of the element in the load-handler. One other point, the attached example uses 2 ways of adjusting the style but actually, either way works so

        e.currentTarget.style.setProperty("position", "relative");
        e.currentTarget.style.setProperty("position", "absolute");

and 

        e.currentTarget.style = "position: relative";
        e.currentTarget.style = "position: absolute; left: 150px";

will also trigger it.

Comment 5 by e...@chromium.org, May 2 2018

Components: -Blink>CSS Blink>JavaScript>API Blink>Loader
Components: -Blink>JavaScript>API Blink

Comment 7 by junov@chromium.org, May 8 2018

Components: -Blink
Cc: yhirano@chromium.org
Owner: joelhockey@chromium.org
Status: Assigned (was: Untriaged)
joelhockey@, do you have any insights? According to #1 your change introduced this behavior.
Owner: ----
Sorry, I don't any insights.  It is hard to see how the change in https://codereview.chromium.org/2759063002 would relate to the behavior described here.  That specific CL, and others I made at the time were a refactoring that were not intended to change anything.
Status: Untriaged (was: Assigned)
The problem is not multiple (or infinite) loading events are dispatched but the plugin is loaded multiple (or infinite) times. You can observer it with devtools open.
Summary: Infinite calling load event when dynamically loading objects with position: absolute (was: Infinite calling load event when dynamically loading objects with display:absolute)
The workaround we were using has been broken in the latest build of Chrome 71.0.3578.80. Previously we could avoid the second HTML object load event firing if we set the container object to display: block. However with the latest Chrome this workaround no longer works and the load event fires multiple times.

See this stackoverflow for details
Fiddle to show Chrome looping the load event is here: http://jsfiddle.net/7dy22xLt/37/ (working fine in other browsers).

Is it possible to get a fix for this, its painful in our application to work around it. Thanks.
Redid the second bisect and AFAICT the suspect is still the same r458571 by joelhockey@
https://chromium.googlesource.com/chromium/src/+log/5e372bf6..d6cb1fe?pretty=fuller
Maybe the refactor changed the order of invocation of something?
This is a real problem for us, we have a production system that we can't easily or quickly work around this bug (we load widgets on a page as HTML objects) and end users who have updated to latest Chrome complaining. Is it possible to expediate a fix for this on the chromium side?
Mergedinto: 908271
Status: Duplicate (was: Untriaged)
Looks like the same issue as Bug 908271.

Sign in to add a comment