Commit Graph

27 Commits

Author SHA1 Message Date
Thibault Malbranche 85b921ce64
fix(deps): updated dependancies and types (#847)
* wip

* Update WebViewShared.tsx

* Update config.yml
2019-09-19 11:40:51 +02:00
Thibault Malbranche 8549be5fd0
fix(iOS): UIWebView Removal (#828)
Apple required us to remove this (see #819)

BREAKING CHANGE: UIWebView has been removed
BREAKING CHANGE: useWebkit prop removal
BREAKING CHANGE: scalesPageToFit prop removal on iOS (since it's not compatible with WKWebview)
BREAKING CHANGE: Renamed RNCWKWebView to RNCWebView on iOS
2019-08-30 12:04:32 +02:00
aksmfosef11 a28096bfe7 feat(iOS): add-javaScriptEnabled prop (#592)
* add-javaScriptEnabled-in-IOS

* Update WebViewTypes.ts
2019-08-29 17:09:42 +02:00
Harry Yu 0424dd0801 feat(iOS): Add prop for allowingReadAccessToURL (#771) 2019-08-29 16:53:09 +02:00
aarondail 493b65de21 feat(iOS): added `contentInsetAdjustmentBehavior` prop
* Adding a `contentInsetAdjustmentBehavior` prop to the WebView for iOS.
This controls the way iOS will automatically adjust the insets when the
webview is behind things like the iPhone X notch.

* Removing the code to explicitly pass contentInsetAdjustmentBehavior to the WebView since it is already passed in otherProps.
2019-08-09 10:55:35 +02:00
DemMarcupan 6f053bad7b feat(focus): Add functionality to imperatively focus webview (#567)
*  - add focus functionality for devices without touch screen
 (faced problem while developing for android TV, cause there only remote controller for device)

* Reimplement as a ref method.

*  - remove redundant requestFocus
2019-08-06 10:56:59 +02:00
Raphael Eidus 9c592d621c feat(android): polyfill applicationNameForUserAgent on Android (#707) 2019-08-02 10:46:03 +02:00
José Luis Pereira 25bc5a55c6 feat(android props): Add incognito to Android (#524) 2019-08-02 09:48:54 +02:00
Erik Engervall 1d649a81c8 chore: Update WebView.tsx (#751 by @erikengervall)
[skip ci]
2019-07-31 15:09:24 -07:00
Penar Musaraj 71d1fcc675 feat(iOS WKWebView): Add mainDocumentURL to onShouldStartLoadWithRequest(#493)
* Pass mainDocumentURL to onShouldStartLoadWithRequest

* Update reference

* Update typescript types

* Update WebViewTypes.ts
2019-06-13 08:59:52 +02:00
Dariusz Niemczyk f8a560ba51 fix(types): android/allowsFullscreenVideo (#590)
Fix missing `allowsFullscreenVideo` prop after https://github.com/react-native-community/react-native-webview/pull/325 got merged.
2019-06-13 08:52:04 +02:00
Penar Musaraj b06be7e136 fix(types): Add missing applicationNameForUserAgent type (#589) 2019-06-02 21:11:51 +02:00
Penar Musaraj d429e82c3a feat(loading): Changed loading/error rendering (#612) 2019-06-02 20:32:22 +02:00
Jared Forsyth e4c8dab2ae feat(onScroll): Add `onScroll` callback for iOS & Android (#516)
* Add `onScroll` callback for iOS & Android

This code was mostly extracted from https://github.com/react-native-community/react-native-webview/pull/202

I tried and tried to make it work with `Animated.event`'s `useNativeDriver`, but I was unsuccessful 😢 that'll have to be done later once I understand better how Animated's native stuff is hooked up.

* fix crash for missing onScroll
2019-05-17 00:27:16 +02:00
Daniel Vicory d72c2ae144 feat(fullscreen videos): Support fullscreen video on Android (#325)
* Extract WebChromeClient from an anonymous class

* Support fullscreen videos on Android

Forces landscape mode while playing.

* Use sticky immersive mode for fullscreen videos

No longer forces landscape mode as that is a problem for portrait videos - allow
the user to rotate as necessary.

Only supports KitKat or greater, and falls back to leaving the status and navigation
bars visible for lower than KitKat. This is the easiest way to prevent issues with
resizing the video during playback.

Also implement a lifecyle event listener which means if a user backgrounds the app
or locks the screen with the video fullscreen, the UI visibility is re-applied.

* Add allowsFullscreenVideo prop to control whether videos can be fullscreen on Android

Luckily, we're able to change the WebChromeClient on demand in response to prop changes
without seeming to do any harm. If you switch to disallow fullscreen, it will attempt
to close the currently fullscreened video (if there is one) so users aren't stuck.

I did notice a bug that if you go from fullscreen allowed, to fullscreen disallowed,
the fullscreen button will remain on the video. Tapping the button will have no effect.
2019-05-17 00:22:08 +02:00
Eric Lewis 455c30e000 feat(WKWebView): Allow focus without user interaction (#540)
* [iOS] Allow focus without user interaction

* Add documentation for keyboardDisplayRequiresUserAction

* set keyboardDisplayRequiresUserAction default to true
2019-04-29 17:46:07 +02:00
manuelblum 5892601c29 fix(types): wrong parameter type in onLoadProgress (#538)
WebViewProgressEvent musst be wrapped within NativeSyntheticEvent
2019-04-29 09:45:15 +02:00
SebiVPS cdbfc19cd2 feat(iOS cookies): implement sharedCookiesEnabled prop for iOS RNCWKWebView (#175)
We had the problem on iOS WebViews that local cookies (stored in local HTTPCookieStorage, set with  [react-native-cookie](https://github.com/shimohq/react-native-cookie) ) were not added in loadRequests. On Android the local stored cookies were sent like expected.
This kinda "hacky" solution is the only way we found, that works for us.
The stack overview link is in the code below.
If someone finds a better solution we would very much like to accept that.
2019-04-15 10:19:10 +02:00
Max Schmeling 5ec74ea9bb fix(styles): Removes hard-coded container white backgroundColor (#478)
Fixes #475

#472 added a `backgroundColor` of `white` to the `container` style which broke the ability to set a `transparent` background color on the `WebView` component. This simply removes that unnecessary style.
2019-04-04 19:44:01 +02:00
Thibault Malbranche 91eb7ce3d1
fix(styles): removed unneeded display: 'none'
fixes #473
2019-04-03 10:19:43 +02:00
Thibault Malbranche 319a86e236
feat(android): fix overflow issues and match iOS default renders (#472)
fixes #466 #194

* feat(android): fix overflow issues and match iOS default render error and loading behaviour

* Use babel preset typescript through react-native instead of ts-jest

* Update yarn.lock

* Update README.md
2019-04-02 16:05:56 +02:00
mr.sadvit 82fe6e2c3d feat(android): textZoom prop to limit scaling issues (#414)
When setting a custom font size in the Android system, an undesirable scale of the site interface in WebView occurs.

I researched that when setting the standard textZoom (100) parameter size, this undesirable effect disappears.

This can be very useful if you need to avoid the scale of content in WebView when changing the size of system fonts, or change textZoom property directly.

Example:

`
<WebView
  textZoom={100}
/>
`
2019-03-28 09:52:18 +01:00
Scott Beca 0f9b770186 Make WebViewSourceHtml.baseUrl optional (#454) 2019-03-26 11:07:51 +01:00
Thibault Malbranche 453b7dd3a0
feat(typescript): Source code rewrite using typescript (#425)
Rewrote the whole repository into typescript. This will provide way better and up to date documentation. This should also add some safety for people contributing 😄 .
Flow types were not working until now which is why this PR doesn't have them but feel free to PR.

This also fixes #384 #435 #206 #171 #168.
2019-03-20 12:35:13 +00:00
Jamon Holmgren af0057a321 Reshuffling 2018-08-02 21:41:20 -07:00
Jamon Holmgren ee3d296d33 WIP: iOS working 2018-07-30 22:34:16 -07:00
Jamon Holmgren be9c217dfe Initial 2018-07-30 20:21:48 -07:00