Flash and PDF touch event issue
I've found a weird issue when using embedded swf and embedded pdfs but I'm not sure what's happening nor how to resolve it.
We are developing a web application that is designed to use touch screens and we are targetting Chrome (currently 52.0.2743.116 m). We have the Adobe Flash Player Plugin for Chrome Version 22.0.0.209) and the Chrome PDF Viewer.
We have a legacy swf file that my company want shown on a website and also some pdfs. The problem I am getting is that if the swf is touched (not clicked) then it seems to hold onto some sort of focus and each touch accumulates this hold. Refreshing the page doesn't seem to fix this but restarting the entire browser does.
I have prepared a plunkr to try and demonstrate: https://plnkr.co/Da6kecRwmBc1EGkRRDQ4
<!DOCTYPE html>
<html>
<head>
<script data-require="jquery@*" data-semver="3.0.0" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<div class="flash-content"><embed src="https://melusine.eu.org/syracuse/swf/1-mandel/mandel01.swf" /></div>
<div class="pdf-content"><embed src="https://partners.adobe.com/public/developer/en/xml/AdobeXMLFormsSamples.pdf" /></div>
<textarea>Just to grab focus</textarea>
</body>
</html>
NOTE, the SWF here and the PDF aren't mine and are just for demonstration. It seems to happen with any To recreate the problem:
A couple of things I have noticed. I am using Angular in my main web application (not here) and listened to all of the events that I could and it seemed that mouse events are not being generated, just touch events, for the touches that are failing in the pdf and text area but I don't know how the events are being affected like this, nor how to fix it.
I have tried using object tags, and iframe for both of the swf and pdf but all result in the same problem.
My current advice to the person I am working for is that we dump the swf because it is old and support is being removed, but I'd still like to try and understand this if I can.
Any help would be greatly appreciated.
链接地址: http://www.djcxy.com/p/36418.html上一篇: 在html中嵌入pdf和图像
下一篇: Flash和PDF触摸事件问题