Couple of new submissions
[webos-internals:imagineer1981s-modifications.git] / browser / browser-gesture-click-open-in-new-card.patch
1 diff --git a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
2 index 09c898f..2fda813 100644
3 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
5 @@ -621,7 +621,15 @@ PageAssistant.prototype._onWebViewSingleTap = function(event) {
6                 tapPt.left = event.centerX - tapPt.left;
7                 tapPt.top  = event.centerY - tapPt.top;
8  
9 -               if (event.altKey) {
10 +        if (event.metaKey) {
11 +            var urlInfo = {};
12 +            var urlInspectResponse = function(response) {
13 +                               urlInfo = response || {};
14 +                               this._newBrowserPage(urlInfo.url);
15 +                       }.bind(this);
16 +                       this._webView.mojo.inspectUrlAtPoint(tapPt.left, tapPt.top, urlInspectResponse);
17 +        }
18 +               else if (event.altKey) {
19  
20                         var popupItems = [
21                                 {label: $L('Open In New Card'), command:'openNew'},
22 diff --git a/usr/palm/frameworks/mojo/builtins/palmInitFramework338.js b/usr/palm/frameworks/mojo/builtins/palmInitFramework338.js
23 index 2db731c..e36f50c 100644
24 --- a/usr/palm/frameworks/mojo/builtins/palmInitFramework338.js
25 +++ b/usr/palm/frameworks/mojo/builtins/palmInitFramework338.js
26 @@ -28127,7 +28127,7 @@ if(!this.isElementHighlighted&&this.trackballMode===false&&this.selectionMode===
27  this._addElementHighlight(event.centerX,event.centerY);
28  }
29  
30 -if(event.altKey){
31 +if(event.altKey || event.metaKey){
32  
33  
34