Commit Graph

663 Commits

Author SHA1 Message Date
mosababubakr
1e16c50b1a
Update missing closed brace to the insert.CSS 2019-11-03 16:56:59 +02:00
Dave Alden
80feff6cf8
Merge pull request #401 from GEDYSIntraWare/bridge
Move bridge creation to injectDeferredObject
2019-09-24 16:21:19 +01:00
Dave Alden
ba345b0159
Merge pull request #534 from GEDYSIntraWare/fix-show-ios13
Fix inappbrowser not opening on iOS 13 by using reusable window. Resolves #492
2019-09-24 15:43:48 +01:00
Niklas Merz
855394628e Fix unresponsive main window after hide 2019-09-24 16:28:07 +02:00
Niklas Merz
79b1bb61a0 Move window hiding to 'browserExit'
Fixes close, hide and toolbar 'done' and makes cordova window responsive
2019-09-23 10:29:31 +02:00
Niklas Merz
4376ddabcd New fix attempt 2019-09-20 15:48:27 +02:00
Niklas Merz
82d496ae5c Use tmpWindow and hide on close 2019-09-20 13:43:57 +02:00
Niklas Merz
81bec09526 (ios) Fix iOS 13 show not working
Removed tmpWindow and controller.
This was introduced to fix IAB with WKWebView before WKIAB existed.
2019-09-06 14:14:51 +02:00
Niklas Merz
8805f5d46a Finish revert and correct Xcode warnings 2019-09-06 13:53:36 +02:00
Niklas Merz
8810c6a8a0 (ios) Fix inappbrowser not opening on iOS 13 by using reusable window
Closes #492
2019-09-06 13:49:44 +02:00
Jan Piotrowski
2b59941514
ci(travis): upgrade to node8 2019-07-01 20:26:57 +02:00
Jan Piotrowski
84dfb09edd chore(release): 3.1.1-dev 2019-06-28 23:12:38 +02:00
Jan Piotrowski
df623882c2 chore(release): 3.1.0 (version string) 2019-06-28 23:12:38 +02:00
Jan Piotrowski
b84203970f chore(release): release notes for 3.1.0 2019-06-28 23:12:38 +02:00
Jan Piotrowski
e9dad636d2 chore: fix repo and issue urls and license in package.json and plugin.xml 2019-06-28 23:12:38 +02:00
Jan Piotrowski
f3b695fde5 build: add .npmignore to remove unneeded files from npm package 2019-06-28 23:12:38 +02:00
Jan Piotrowski
5741d4af6d build: add .gitattributes to force LF (instead of possible CRLF on Windows) 2019-06-28 23:12:38 +02:00
Jan Piotrowski
c2bb6c1409
ci(travis): Update Travis CI configuration for new paramedic (#478)
* Update Travis CI configuration for new paramedic

* remove wrong ADDITIONAL_TESTS_DIR

* Update .travis.yml

* remove failing platform
2019-06-20 15:19:13 +02:00
Jan Piotrowski
cc5ee007c6 docs: remove outdated translations 2019-06-20 15:18:42 +02:00
Ralph Gutkowski
94fec84d5c Fix beforeload for Android <= 7 (#427)
* Fix beforeload for Android <= 7
* Change Android version check conditional
2019-06-13 00:33:23 +05:30
Jesse MacFadyen
a162bd9076
Fix failing CI tests (#460)
* bump node version to 6
* use default travis osx_image of xcode9.4
* comment out flakey local test
2019-04-09 10:49:41 -07:00
Jesse MacFadyen
af44235a61
Merge pull request #440 from cordova-develop/fix-close-event-test
Fix test spec.5 to close inappbrowser after loadstop event
2019-03-06 00:00:48 -08:00
Jesse MacFadyen
2500b08946
Merge pull request #383 from cvanem/master
Example documentation - Fix messageCallBack and beforeloadCallBack function names
2019-03-05 23:55:34 -08:00
Jesse MacFadyen
d01bd25a88
Merge pull request #262 from landsbankinn/CB-13969
Cb 13969 - Allow close button and navigation buttons positions to be swapped
2019-03-05 23:31:12 -08:00
Jesse MacFadyen
eb3acc04cc
Merge pull request #439 from apache/revert-353-patch-1
Revert "Add support for right to left direction languages"
I mistakenly merged #353 instead of a similar one.
2019-03-05 23:27:13 -08:00
KNaito
5f1afbdf05 Fix test spec.5 to close inappbrowser after loadstop event 2019-03-06 11:47:21 +09:00
Jesse MacFadyen
2f74d677b7
Revert "Add support for right to left direction languages" 2019-03-05 17:56:34 -08:00
Jesse MacFadyen
7b16ee88a4
Merge pull request #353 from transoceanic/patch-1
Add support for right to left direction languages
2019-03-05 17:34:19 -08:00
Jesse MacFadyen
c95dbcbaea
Merge pull request #436 from purplecabbage/ValidateCallbackId
[android] Prevent malformed callbackId from reaching app cordova view
2019-03-01 20:54:49 -08:00
Jesse MacFadyen
686108484e Prevent malformed callbackId from reaching app cordova view 2019-02-28 14:52:01 -08:00
Steinar Ágúst
f861655382 CB-13969 fixing README to be correct for lefttoright option 2019-02-28 15:17:24 +00:00
Steinar Ágúst
9c7c2f31d8 CB-13969 functionality extended to WKWebView 2019-02-28 14:39:26 +00:00
steinaragustli
3c0a42e2ae
CB-13969 fix inappbrowser.css to be unmodified 2019-02-28 14:11:04 +00:00
Steinar Ágúst
5359f6cf18 CB-13969 reverting to older version of inappbrowser.css to leave it out of PR 2019-02-28 14:05:05 +00:00
Steinar Á. Steinarsson
df84ddabd2 CB-13969 trying to fix some wierd issue for PR 2019-02-28 13:04:21 +00:00
Steinar Á. Steinarsson
2bcec40213 CB-13969 trying to fix some wierd issue for PR 2019-02-28 13:02:04 +00:00
steinaragustli
fc0c560bff
CB-13969 trying to remove inappbrowser from pr 2019-02-28 12:50:53 +00:00
steinaragustli
5ead1e6a7e
CB-13969 trying to remove inappbrowser.css from pr 2019-02-28 12:50:02 +00:00
Steinar Ágúst
c7931faa7e CB-13969 adding newline at end of inappbrowser.cs 2019-02-28 12:36:28 +00:00
Steinar Ágúst
e2adf1b285 CB-13969 fixing inappbrowser.css 2019-02-28 12:33:15 +00:00
Steinar Ágúst
4adf4c7230 CB-13969 updating README.MD to better explain lefttoright parameter option, reverting unneccesary indent changes on inappbrowser.css 2019-02-28 12:28:58 +00:00
Steinar Ágúst
74ccef1226 Merge remote-tracking branch 'upstream/master' 2019-02-28 11:43:34 +00:00
Jan Piotrowski
92243cdcc2
Add headline to window.open documentation (#406) 2019-02-22 18:27:30 +01:00
Dave Alden
388e3f6ae7 (iOS) Fix iframes in iOS/WKWebView which were broken by #418. Fixes #424. (#425) 2019-02-12 00:14:18 +01:00
Jan Piotrowski
ae329bc4c2 Add or update GitHub pull request and issue template 2019-02-11 18:39:42 +01:00
Dave Alden
9f4b72982a GH-417: Handle non-default target attribute values (e.g. target=on links in WKWebView implementation on iOS (#418) 2019-02-10 18:06:35 +01:00
Tim Brust
6db2f2d324 fix(typescript): remove unused replace parameter (#410)
This closes #295
2019-01-29 22:54:54 +01:00
Niklas Merz
e3db974080 (ios) Move createIframeBridge to injectDeferredObject
Avoid failed script injections for pages which did not finish loading.
2019-01-16 14:22:51 +01:00
cvanem
a890e606eb
Example documentation - Fix callBack function name 2018-12-25 15:01:43 -07:00
Dave Alden
632a395b3d GH-359: Fix beforeload to work with POST requests (#367)
### Platforms affected
iOS and Android


### What does this PR do?
Fixes the behaviour of `beforeload` to resolve the problem with POST requests outlined in #359.

The `beforeload` parameter has been changed from taking only a boolean (`yes` or not defined) to a discrete string with possible values of `get`, `post`, or `yes` which correspond to request types of GET, POST or GET&POST respectively. The `README.md` has been updated to reflect this.

Note that use of `beforeload` to intercept POST requests is currently not supported on Android or iOS, so if `beforeload=yes` is specified and a POST request is detected as the HTTP request method, `beforeload` behaviour will not be applied. If `beforeload=post` is specified, a `loaderror` event will be dispatched which states that POST requests are not yet supported.

#### Notes for Android

The `shouldOverrideUrlLoading()` override method has been updated to support the [new method interface added in API 24 / Android 7][1] which receives the `WebResourceRequest` instead of just the `String url`, enabling the HTTP method of the request to be determined. The [deprecated method interface][2] has also been preserved for API <=23, but in this case the HTTP method cannot be determined so is passed as null.

Also note that due to a [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=155250),  `shouldOverrideUrlLoading()` is currently not called for POST requests. It's possible this may be resolved in a future Chromium version in the Android System Webview (given that this is now self-updating and independent of Android version since Android 5.0) - in prospective anticipation of this, code to handle POST requests has been added to `shouldOverrideUrlLoading()`.

However, it seems more likely that this won't be resolved any time soon given that [a Chromium dev said](https://bugs.chromium.org/p/chromium/issues/detail?id=155250#c39):

 > We're looking at implementing a better way to handle request interception in a future OS version. There's no way to just "fix" this, the API doesn't accommodate this usage at all. This will not be something you can use any time soon.

Therefore if we want to go ahead and use `beforeload` to intercept request types other than GET, it's likely we'll instead need to use the `shouldInterceptRequest()` method override. As with `shouldOverrideUrlLoading()`, there are a two variants: the [new method interface][3] added in API 21 / Android 5.0 which  which receives the `WebResourceRequest` object and the [deprecated one][4] which receives only `String url`. If we want to determine the HTTP request method, we'll need to use the new implementation. This has been empirically tested and *is* called for POST requests so would allow the possibility to intercept, delay, modify and send the POST request and its data via `beforeload`.
Both `shouldInterceptRequest()` method interfaces have been exposed in the Android implentation for potential future use but they currently do nothing other than return the unadulterated request object.

### What testing has been done on this change?
Manual testing of POST and GET requests on both platforms using a test app container:
https://github.com/dpa99c/cordova-plugin-inappbrowser-test

[1]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)
[2]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)
[3]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)
[4]: https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldInterceptRequest(android.webkit.WebView,%20java.lang.String)
2018-12-20 20:31:14 +01:00