[Webkit-unassigned] [Bug 56012] New: Touch Events arbitrary exposed on Desktop version of Qtwebkit
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 9 06:47:57 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=56012
Summary: Touch Events arbitrary exposed on Desktop version of
Qtwebkit
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: All
Status: UNCONFIRMED
Severity: Major
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: cedric at infonais.fr
Since Qt4.6 (as far as I could read) Webcore is exposing touch events even if the device isn't a touch device.
It's is missleading javascript application to think they are on a touch device and disable standard events handler.
to reproduce the problem try to load the HelloWorld sample : http://code.google.com/intl/fr-FR/apis/maps/documentation/javascript/examples/map-simple.html
into a qwebview
the map will load with the mobile UI no mouse drag (pan) no mousewheel (zoom)
this is caused by a test made by the google api.
function gk(a,b){
var c=n[tb]("div");c[x](b,"return;");
return typeof c[b]=="function"||b in n[ji]
};
we have
var n = document;
var tb = "createElement";
var x = "setAttribute";
var ji = "documentElement";
gk(qk,"ontouchstart"); // will always return true on Qtwebkit
the function create a div element assign "return;" to the ontouchstart event and check if the type of the returned object is function
it also check the property "ontouchstart" of document.documentElement
it should be possible to not expose the touchevents (ontouchstart,ontouchmove,ontouchend) within the application
something like QWebSettings::globalSettings()->setAttribute(QWebSettings::TouchEnabled,true/false);
I guess not only google api is impacted other big JS libraries like Jquery/JQueryMobile/Modernizr should also be affected.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list