futurepress / epubjs-rn

EpubJS React Native Example
Other
270 stars 150 forks source link

Weird Scroll Behavior #158

Open frasermince opened 4 years ago

frasermince commented 4 years ago

Whenever selecting text near the left or right edge of the screen the webview scrolls to the next page. This causes undesired text to be selected. In addition to this whenever a selection is dragged it causes undesired scrolling.

Screenshots/Videos:

ClickScrollSmaller DragScrollSmaller

Environment:

cuongpv219 commented 4 years ago

What version of epubjs-rn do you have?

RuslanAndroid commented 4 years ago

Та же проблема. Для корректной работы приходится перехватывать нативный скролл на уровне реак нейтив и блокировать его во время выделения текста.

DDushkin commented 4 years ago

+1 the same on Android, and also weird onLocationChange behavior

frasermince commented 4 years ago

I realized I never responded to this. I am using the most up to date version of the library. This is definitely just the default behavior of WkWebview. After a lot of research I discovered the best solution is to just recreate select behavior manually. Even amazon does this in the Kindle app. For now I turned off text selection all together and added a custom svg rectangle around a word on tap. It's not perfect but it works for my purposes.