Commit 73b28851 authored by Raine Makelainen's avatar Raine Makelainen

Merge branch 'jb38734' into 'master'

[nemo][embedlite-component] Don't open speculative connection upon press. Fixes JB#38734

See merge request mer-core/embedlite-components!36
parents c4871829 a9888e9e
......@@ -612,6 +612,23 @@ EmbedHelper.prototype = {
_handleTouchEnd: function(aEvent) {
this._viewportReadyToChange = true;
// Can only trigger if we have not seen touch moves e.i. we do have highlight element. Touch move
// cancels tap highlight and also here we call cancel tap highlight at the end.
if (this._highlightElement) {
let target = aEvent.target;
if (target) {
let uri = this._getLinkURI(target);
if (uri) {
try {
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
} catch (e) {
dump("Speculative connection error: " + e + "\n")
}
}
}
}
this._cancelTapHighlight();
},
......@@ -627,12 +644,6 @@ EmbedHelper.prototype = {
return;
}
let uri = this._getLinkURI(target);
if (uri) {
try {
Services.io.QueryInterface(Ci.nsISpeculativeConnect).speculativeConnect(uri, null);
} catch (e) {}
}
this._doTapHighlight(target);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment