Google chrome deleting javascript events after opening or closing developer console
Reported by
tony.jos...@live.com,
Mar 15 2018
|
||||
Issue description
UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Steps to reproduce the problem:
$(() => {
let bindEvents = () => {
alert('Binding events');
let targets = $('iframe').contents().find('rect');
$.each(targets, (elm, i) => {
$(targets[elm]).on('click', () => {
alert('Hello, World!');
});
});
}
setTimeout(bindEvents, 10000);
});
I have an iframe embedded in a webpage. This iframe has a some `rect` elements inside an `svg` element. The following code is used to bind events to the `rect elements:
let targets = $('iframe').contents().find('rect');
$.each(targets, (elm, i) => {
$(targets[elm]).on('click', () => {
alert('Hello, World!');
});
});
On chrome 64 these events are getting deleted when developer console is opened. On chrome 65, these events won't get binded if developer console is not opened.These issue is happening in chrome on ubuntu. Chrome 58 and 61 has no issues in binding evnets.
What is the expected behavior?
Events should persist irrespective of developer tools state
What went wrong?
Events are getting deleted after opening or closing developer console
Did this work before? N/A
Chrome version: 65.0.3325.162 (Official Build) (64-bit) Channel: stable
OS Version: Ubuntu 17.10
Flash Version:
,
Mar 16 2018
Reporter@ - Thanks for filing the issue...!! Could you please provide a sample test file/url to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Apr 11 2018
,
Apr 16 2018
Could you provide a link to a page where this reproduces?
,
Apr 17 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by viswa.karala@chromium.org
, Mar 15 2018