cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-14190) Double click `<select>` element causes app to exit.
Date Wed, 03 Oct 2018 17:24:00 GMT

    [ https://issues.apache.org/jira/browse/CB-14190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637250#comment-16637250
] 

ASF GitHub Bot commented on CB-14190:
-------------------------------------

janpio closed pull request #275: CB-14190: (windows) Fix bug where double clicking `<select>`
exits app
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/275
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js
index 9e544c5d0..1af6b95f8 100644
--- a/src/windows/InAppBrowserProxy.js
+++ b/src/windows/InAppBrowserProxy.js
@@ -159,10 +159,12 @@ var IAB = {
                     // Save body overflow style to be able to reset it back later
                     bodyOverflowStyle = document.body.style.msOverflowStyle;
 
-                    browserWrap.onclick = function () {
-                        setTimeout(function () {
-                            IAB.close(navigationEventsCallback);
-                        }, 0);
+                    browserWrap.onclick = function (e) {
+                        if (e.target !== popup) {
+                            setTimeout(function () {
+                                IAB.close(navigationEventsCallback);
+                            }, 0);
+                        }
                     };
 
                     document.body.appendChild(browserWrap);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Double click `<select>` element causes app to exit.
> ---------------------------------------------------
>
>                 Key: CB-14190
>                 URL: https://issues.apache.org/jira/browse/CB-14190
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-inappbrowser, cordova-windows
>    Affects Versions: 3.0.0
>            Reporter: Iain Connor
>            Assignee: Jesse MacFadyen
>            Priority: Minor
>
> In Windows, create an inappbrowser and browse somewhere with target not `_system` or
`_self` or empty.
> Find a `<select>` element and double click it.
> Expected behaviour:
> First click expands `<select>` dropdown by showing `<option>`s.
> Second click is ignored or chooses `<option>` under cursor, if there is one.
> Actual behaviour:
> Second click exits the inappbrowser.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message