[
https://issues.jboss.org/browse/JBIDE-20756?page=com.atlassian.jira.plugi...
]
Konstantin Marmalyukov commented on JBIDE-20756:
------------------------------------------------
We have actually two issues here:
1. If browser engine is SWT.WebKit touch events will not work and produce error which is
mentioned it description
Reproducile: both on small and heavyweight pages, *only on Linux*
It happens because SWT.WebKit gives error on line "delete
finger.target[onEventName];" - it is actually null. With old versions of webkitgtk
everything was fine. Nullcheck is simple workaround.
2. If browser engine is JavaFx, touch events will not work on small examples.
Reproducible: on every platform, example of html file is in description
It happens because we load touch events script on DomContentLoaded event. Also easy to
fix
Touch events for BrowserSim are not set properly
------------------------------------------------
Key: JBIDE-20756
URL:
https://issues.jboss.org/browse/JBIDE-20756
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: browsersim
Affects Versions: 4.3.0.CR1
Environment: JBDS 9.0.0.CR1-v20150918-0257-B105 Fedora 22 KDE 64bit
Reporter: Vlado Pakan
Assignee: Konstantin Marmalyukov
Fix For: 4.3.x
1. Create HTML page with this content:
{code:html}
<!DOCTYPE html>
<html>
<head>
<title>sample</title>
<script type="text/javascript">
function window_onload() {
document.getElementById('touchable').addEventListener('touchstart',
function(ev) {
alert('touchstart')}, false);
document.getElementById('touchable').addEventListener('touchend',
function(ev) {
alert('touchend')}, false);
document.getElementById('touchable').addEventListener('touchmove',
function(ev) {
alert('touchmove')}, false);
}
</script>
</head>
<body onload='window_onload();'>
<div id='touchable'>This element is touchable.</div>
</body>
</html>
{code}
2. Open this page in BrowserSim
3. Enable touch events for BrowserSim
4. Click somewhere within the page in BrowserSim
ERROR:
{noformat}
!JavaScript WARN: Converting `ontouchstart` property to event listener.
!JavaScript ERROR: TypeError: Unable to delete property. on line 118 for
file:///.../jboss-touchevents/src/main/webapp/index.html
!JavaScript WARN: Converting `ontouchend` property to event listener.
!JavaScript ERROR: TypeError: Unable to delete property. on line 118 for
file:///.../jboss-touchevents/src/main/webapp/index.html
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)