Embedded pdf becomes completely isolated from the main HTML's DOM
Reported by
shima...@gmail.com,
Jun 17 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Steps to reproduce the problem: 1. Open the console and Access to http://www.broadband-xp.com/test/chrome/emed/embed.html. 2. Click the PDF itself and find no console output by clicking it. 3. Click the button right next to the PDF and then document.getElementById("pdf").click() is detected. What is the expected behavior? Even when clicking the PDF itself, document.getElementById("pdf").onclick should be detected. What went wrong? When clicking the PDF itself, no onclick, mousedown, mousemove event is detected. Did this work before? Yes 65.03325.162 Chrome version: 67.0.3396.87 Channel: stable OS Version: 10.0 Flash Version: When detecting the mousemove event, "at first" mousemove on the PDF can be recorded. But this is only right after the load. After the initial load, the PDF becomes completely isolated from the main DOM. It can not be accessed from DOM anymore. So if you move the mouse outside the PDF, document.onmouseevent is detected but if you move the mouse on the PDF, neither document.onmousemove event and document.getElementById("pdf").onmouseevent can be detected. This was not happening in the older version. You can not change the url of the PDF after the completion of the load.
,
Jun 17 2018
,
Jun 18 2018
Able to reproduce this issue on Windows 10, Mac OS 10.13.5 and Ubuntu 14.04 on the latest Stable 67.0.3396.87 and latest Canary 69.0.3463.0 as per comment #1. Bisect Information: =================== Good Build: 65.0.3303.0 Bad Build : 65.0.3304.0 By running the per-revision bisect script, below is the Changelog URL. https://chromium.googlesource.com/chromium/src/+log/d37a9f10c7e32ff40e864a2ff30478fc8a0a1169..8e8ae37d2e02943cadb4d658777866e8e4a12f60 From the above Changelog, suspecting the below change: Reviewed-on: https://chromium-review.googlesource.com/838626 sadrul@ Please check and confirm if this issue is related to your change, else help us in assigning to the right owner. Thanks
,
Jun 18 2018
,
Jun 19 2018
,
Jun 25 2018
Thank you all. I hope this issue will be fixed soon.
,
Jul 10
Is it possible to fix this bug until the release of stable version 68? Thank you in advance.
,
Jul 16
Issue 863729 has been merged into this issue.
,
Jul 30
To sadrul@chromium.org: Could you please fix this bug as soon as possible? Thank you in advance.
,
Jul 31
--> kenrb@, /cc+ riajiang@
,
Aug 1
The current behavior matches that of Firefox, does it not? There was some discussion about this some time ago, and the behavior of clicks on PDFs generating DOM events. There was some thinking that it shouldn't be that way, and the embedding page only sees interactions with PDFs because of how WebKit implemented plugins. That behavior is lost because PDFs are now in different processes and events are directly routed to them. We might consider this working as intended.
,
Oct 3
I have confirmed that the current behavior matches that of Firefox, even though it changed from previous Chrome behavior. I'd like to call this working as intended and close this bug.
,
Oct 3
Reporter, this is right now an intended behavior. So this is unlikely to get fixed. However, can you elaborate more on the usecase that you have? What are you trying to achieve in your webpage?
,
Oct 3
Specifically speaking, I have wanted to disable contextmenu or want to detect oncontextmenu event. And even though it is true that the current behavior is the same as Firefox's internal PDF Viewer, however, please compare it with Internet Explorer in relation to Adobe Reader. Internet Explorer's JavaScript can communicate with Adobe Reader's Acrobat JavaScript (hostContainer), thus can control Adobe Reader through DOM. For example, you can change the current page or change the zoom percentage, with your own HTML interface, without relying on Adobe Reader's native interface. From another perspective, you can know which page your readers are reading now and how much minutes they are reading the page. You can know when they left your site, and which page is attractive or boring. I hope that in the future with Google Chrome as well it can communicate with embedded PDF and enable us to control it through DOM.
,
Oct 31
Re: comment 14, I can't authoritatively speak to the feasibility of that (although I believe it would be contrary to the goals of same origin policy, since a PDF loaded from another origin could be sensitive), but I'm closing this bug since we consider the current input event behavior is correct. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by woxxom@gmail.com
, Jun 17 201810.9 KB
10.9 KB View Download