Skip to content

Commit

Permalink
Merge pull request #1536 from esteemapp/touchstart
Browse files Browse the repository at this point in the history
Touchstart to click and swipe back area decrease
  • Loading branch information
feruzm authored Jan 30, 2020
2 parents f142f5c + 6c461f3 commit 382ebce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/components/postElements/body/view/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const stackNavigator = createStackNavigator(
screen: Post,
navigationOptions: {
gesturesEnabled: true,
gestureResponseDistance: { horizontal: 100 },
gestureResponseDistance: { horizontal: 70 },
},
},
[ROUTES.SCREENS.EDITOR]: { screen: Editor },
Expand Down

0 comments on commit 382ebce

Please sign in to comment.