Merge pull request #1536 from esteemapp/touchstart

Touchstart to click and swipe back area decrease
This commit is contained in:
Feruz M 2020-01-30 13:55:11 +02:00 committed by GitHub
commit 382ebce3cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -135,11 +135,10 @@ for (var i = 0; i < images.length; i++) {
var resultStr = JSON.stringify(JSON.stringify(result));
var message = 'window.ReactNativeWebView.postMessage(' + resultStr + ')';
if (!images[i].classList.contains("video-thumbnail") && !images[i].parentNode.classList.contains("markdown-external-link")) {
images[i].setAttribute("onTouchStart", message);
images[i].setAttribute("onClick", message);
}
}
document.addEventListener('touchstart', function(event) {
event.preventDefault();
document.addEventListener('click', function(event) {
var el = event.target;
while (el.tagName !== 'A') {
if (!el.parentNode) {

View File

@ -112,7 +112,7 @@ const stackNavigator = createStackNavigator(
screen: Post,
navigationOptions: {
gesturesEnabled: true,
gestureResponseDistance: { horizontal: 100 },
gestureResponseDistance: { horizontal: 70 },
},
},
[ROUTES.SCREENS.EDITOR]: { screen: Editor },