Commit Graph

143 Commits

Author SHA1 Message Date
theofournier a12e231121
feat(android): add minimum font size (#2279) 2022-01-07 18:48:23 -08:00
Franz Bruckhoff cd42aa7f11
feat(ios): Enhanced permissions handling to prevent repetitive prompts. (#2257) 2021-11-29 10:47:28 +01:00
Hyunseung Lee 46ecef868a
chore(docs): Update Reference.md (#2254)
- Fix missing curly braces in onCustomMenuSelecton example
- Fix the missing ``` code closing (markdown) in forceDarkOn example
2021-11-29 10:45:11 +01:00
Mitchell cead980c54
chore(docs): Update link in Custom-iOS.md (#2202) 2021-10-29 00:31:59 +02:00
Archie b9624264a3
chore(docs): Fixed typo (#2214) 2021-10-29 00:31:23 +02:00
Scott Batson e1fc730eed
Allow custom menu items for selection menu (#2101)
remove unused vars

use gesture handler

change callback name, pass selected text back

do not use deprecate setTarget

do not call super on methodSignatureForSelector twice

add checks for custom menu items and callback

make custom params optional

add custom menu items outside of initWithFrame

require key and label for menuItems

fix typo
2021-10-08 08:38:43 +02:00
iwashi1t 0c42a9812e
feat(auth): Basic Authentication Support (#1467)
Some people prefer using this new prop over the http://username:password@example.com syntax, now webview supports both
2021-09-30 18:03:34 +02:00
Sashka 404e3e69e2
feat(onError): Add support for preventDefault when using onError method (#1706)
* Add event.isDefaultPrevented() check within onError method

* Update onError in the reference regarding preventDefault

* Fix return values in the 'onError' method

* Minor update for Reference.md in "onError" section

* Update WebView.windows.tsx

* Update WebView.windows.tsx

* Update WebView.android.tsx

* Update WebView.ios.tsx

* Update WebView.macos.tsx

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
Co-authored-by: Thibault Malbranche <malbranche.thibault@gmail.com>
2021-08-09 23:39:15 +02:00
Cloud Zhang 19980d888d
feat(android): force dark mode (#2063)
Co-authored-by: 张 云 <zhangyun@sidechef.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-08-09 19:57:33 +02:00
Asuki Kono 95da0aa8d2
chore(docs): Update explanation to open remote debug window (#2052) 2021-08-09 19:44:28 +02:00
Lucas Alves e0f22b7db0
chore(docs): Update content in readme pt-br (#2090) 2021-08-09 19:38:44 +02:00
Stanciu Bogdan Mircea b92b98637c
feat(android): add props to control pinch to zoom and internal zoom controls (#2113)
Co-authored-by: Mircea Bogdan Stanciu <mirceabogdanstanciu@gmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-08-09 19:37:44 +02:00
Rodolphe Lemasquerier 6bac272a5f
feat: add prop to allow nested scroll on android (#2056)
* feat: add prop to allow nested scroll on android

When set to true, this prop allow to scroll inside the webview when the webview is inside a scrollview on android

* docs: nestedScrollEnabled prop usage
2021-08-09 19:14:26 +02:00
Thibault Malbranche 8a45fcf7f9 fix(android): revert change ThemedReactContext to ReactContext 2021-05-21 01:26:56 +02:00
Nizam Moidu 30685edda0
feat(ios): Apple Pay support (#1946)
* Apple Pay support in ios Webview

* Apple Pay example

* rename prop to enableApplePay

* disable js evaluation if enableApplePay set to true

* documentation update for apple pay support
2021-05-21 00:17:24 +02:00
Caleb Clarke c1e91f7d73
fix(types): Remove references to nonexistent extraNativeComponentConfig prop (#1958) 2021-05-21 00:11:12 +02:00
Gaurav Gupta 7b71364a9c
fix(android): Changing ThemedReactContext to ReactContext to allow custom stuff (#1994)
* changing ThemedReactContext to ReactContext

* updating documentation

Co-authored-by: Gaurav Gupta <gaurkum@microsoft.com>
2021-05-20 10:20:42 +02:00
Jamon Holmgren 89fd2db39b
chore(docs): Adds some simple webview JS debugging tips (#1969 by @jamonholmgren)
[skip ci]
2021-05-07 17:16:07 -07:00
John Kennedy Mumo d352d147bd
feat(windows): Add POST requests, fixes Windows CI issues, and other QOL (#1926)
* Added POST request support for Windows.

* Cleanup formatting for docs

* Updated test certificate

* Reverted publisher name and fixed password mismatch

* Fixes to Windows tests

* Remove winappdriver install

* Run react-native server in background

* Added url encoded form support

* Added support for custom headers

Co-authored-by: Kennedy Mumo <kemumo@microsoft.com>
2021-04-14 01:40:49 +02:00
Chiara Mooney 9d9fda87fa
chore(docs): Update Instructions for Windows WebView Scrolling (#1927)
* Update with Windows Scroll with Touch Requirements

* Rephrase
2021-03-22 16:01:18 +01:00
Ivari Tölp 7decc5cff1
feat(ios): Add support for `limitsNavigationsToAppBoundDomains` (#1662)
* Add support for iOS-specific prop `limitsNavigationsToAppBoundDomains`

* Add check for `limitsNavigationsToAppBoundDomains` property

Turns out that @available is simply bugged right
now in Xcode and will pretty much always return
`true`. Adding a check for the property actually
existing as well will avoid iOS <14 crashing horribly.

* Improve documentation

Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-03-17 00:29:40 +01:00
Erik Rothoff Andersson 9c51a17040
chore(docs): Clarify that navigationType and isTopFrame is iOS only (#1880) 2021-03-15 10:21:35 +01:00
Bhargab f7504ccead
chore(docs): fixed "postMessage" url in Reference.md (#1913) 2021-03-15 10:20:57 +01:00
RecianuCiprian 8d098efce7
feat(iOS & MacOS): allowUniversalAccessFromFileURLs property(#1730)
* Added allowUniversalAccessFromFileURLs property to iOS and macOS
Updated the types to include allowUniversalAccessFromFileURLs and allowFileAccessFromFileURLs for iOS and macOS
Updated the Reference.md to include in the allowUniversalAccessFromFileURLs section iOS and macOS

* Updated platform in the type definition
2021-01-20 19:31:42 +01:00
Bill Xie d46a6d3c69
feat(iOS 13+): automaticallyAdjustsScrollIndicatorInsets prop (#1077)
* fix:iOS13  scrollView.automaticallyAdjustsScrollIndicatorInsets default value YES which make the webview vertical indicator position in wrong offset

* added types and doc

Co-authored-by: BillHsieh <xietian@meitunmama.com>
Co-authored-by: xietian <xietian@innotechx.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
Co-authored-by: Thibault Malbranche <malbranche.thibault@gmail.com>
2021-01-20 19:09:27 +01:00
Joshua Smith 4b479d6d3f
chore(docs): update repo references with new repo location (#1657)
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-01-20 18:49:11 +01:00
Kevin Tuazon 43443d8ca8
chore(docs): Update Custom-Android.md (#1787)
Updates ReactWebViewClient to RNCWebViewClient
2021-01-20 18:45:45 +01:00
Nizomiddin Toshpulatov 84b7177d21
fix(ts): onScroll event type (#1631)
* Fix onScroll event type

* Update documentation

* Address PR feedback
2020-12-05 20:29:37 +01:00
Lorenzo Sciandra 194c6a2335
feat(android): Introduce setSupportMultipleWindows to mitigate CVE-2020-6506 (#1747 by @mrcoinbase and @kelset -- THANK YOU!)
BREAKING CHANGE:

This release introduces the `setSupportMultipleWindows` prop for Android. This sets the underlying Android WebView setting `setSupportMultipleWindows`. This prop defaults to `true` (previously `false`), and serves to mitigate the security advisory [CVE-2020-6506](https://github.com/react-native-webview/react-native-webview/security/advisories/GHSA-36j3-xxf7-4pqg).

The primary way this new behavior changes existing React Native WebView implementations on Android is that links that open in new tabs/windows (such as `<a target="_blank">`) will now prompt to open in the system browser, rather than re-using the current WebView.

If this behavior is not desirable, you can set this new prop to `false`, but be aware that this exposes your app to the security vulnerability listed above. Make sure you have read and understand the whole advisory and relevant links.

iOS & Windows are unaffected.

```jsx
<WebView
  // ...
  setSupportMultipleWindows={true} // default: true
/>
```

Thanks to @mrcoinbase, @kelset, and @Titozzz for their work on this.
2020-11-24 09:15:19 -08:00
Christopher Pfohl 1bc38da53f
docs: update injectedJavascript ios docs (#1704 bu @Crisfole) 2020-10-21 08:52:28 -07:00
Kesha Antonov 22a60fd23a
feat(iOS): Add prop autoManageStatusBarEnabled (#914)
Co-authored-by: Jamon Holmgren <jamon@infinite.red>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2020-09-15 02:42:09 +02:00
Dominic Lee 40814101be
chore(docs): remove hash url change note (#1622) 2020-09-08 23:55:50 +02:00
Leonardo Russo db529e265f
Updated Guide.md for using injectedJavaScript (#1578)
https://github.com/react-native-community/react-native-webview/issues/1554
2020-08-25 15:02:13 +02:00
oliviacaraiman 9ffca8f9db
feat(android): Add androidLayerType as prop (#1588)
* Add androidLayerType as a prop

* Deprecate "androidHardwareAccelerationDisabled" prop

* Update reference

Co-authored-by: Olivia Caraiman <olcaraim@microsoft.com>
2020-08-24 14:23:38 +02:00
Sergei Butko a02d88f54f
feat(iOS): Add the pull to refresh (#1265)
* Add pull to refresh support for iOS

* Add pull to refresh control removal from WebView

* Add the type and reference description about pull to refresh

* Set bounces to true when enabling pull to refresh, add references

* Add the back to props anchor to pullToRefreshEnabled
2020-08-17 12:07:36 +02:00
Caleb Clarke 6a9116f2d1
feat(events): Add isTopFrame to shouldStartLoadForRequest (#1537)
* Add isTopFrame to shouldStartLoadForRequest on iOS

onLoadingStart is not raised for inner frames, but onShouldStartLoadWithRequest still is. This keeps that behavior but adds isTopFrame to onShouldStartLoadWithRequest so that apps can perform their own filtering if desired.

* Update docs

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-15 11:21:38 +02:00
Bryan Stearns 621d2df72e
chore(docs): Add a debugging note (#1517 by @BryanStearns)
[skip ci]

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-14 20:24:05 -07:00
Caleb Clarke 8b69452643
feat(ios): Add iOS contentMode property (#1538 by @TheAlmightyBob)
This allows overriding iPadOS 13's desktop-class browsing to load mobile content instead of desktop content.

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-14 20:16:54 -07:00
cristianoccazinsp 8a8b7ceb98
feat(android): WebView crash handling (#1480)
Co-authored-by: Cristiano Coelho <cristianocca@hotmail.com>
2020-08-06 22:21:01 +02:00
Dragoș Străinu 97aaf89037
docs(reference): add links to top with jump2header (#1528 by @strdr4605)
[skip ci]
2020-07-23 22:21:56 -07:00
Anton Vlasenko a2029d2d47
chore(docs): Fix broken link in docs/Guide.md (#1436 by @Sappphire64)
[skip ci]
2020-06-13 15:13:01 -07:00
Salvatore Randazzo ac4e05e0f2
feat(android): Add support for injectedJavaScriptBeforeContentLoaded on Android (#1099 by @SRandazzo and @ @shirakaba) 2020-06-13 13:54:48 -07:00
Kai Guo e402e739ea
fix(windows): Add postMessage for Windows WebView (#1263 by @kaiguo) 2020-05-29 13:19:11 -07:00
Akinn Rosa 79eb905a97
chore(docs): Update brazilian translation and reference in main readme.. (#1332 by @akinncar)
[skip ci]
2020-05-28 16:55:00 -07:00
Colin 131dd9ebe8
chore(docs): Update link in custom-android docs (#1382 by @ColinRTaylor)
[skip ci]
2020-05-28 16:54:07 -07:00
Karthik Subramaniam 03dbcb870e
fix(android): Updated permissions for Android Q and above (#1384 by @Karthz) 2020-05-28 16:47:26 -07:00
Bengt Ove Sannes d9c73e0f6f
chore(docs): Update Guide.md (#1305 by @bovesan)
[skip ci]
2020-05-28 10:10:24 -07:00
trcoffman 91df544fae
feat(webview): Allow javascript to open windows automatically (#1409 by @trcoffman)
[skip ci]
2020-05-28 09:54:20 -07:00
Kai Guo 20a3f90c0f
fix(windows): Fix windows local asset path (#1335 by @kaiguo)
[skip ci]
2020-05-15 15:34:55 -07:00
trcoffman a6010d93e0
feat(iOS): Add onFileDownload callback (#1214)
`onFileDownload` is called with the URL that you can use to download the file.
When RNCWebView detects that the HTTP response should result in a file download,
`onFileDownload` is called. The client can then provide code to download
the file.

RNCWebView determines that a file download should take place if either of the
following is true:
1. The HTTP response contains a `Content-Disposition` header that is of type
  'attachment'
2. The MIME type of the response cannot be rendered by the iOS WebView
2020-04-29 09:09:22 -07:00