Skip to content

Commit

Permalink
Fix broken EPUB selection in paginated mode (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickael-menu authored Apr 29, 2024
1 parent 3abdb8c commit e42d495
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ All notable changes to this project will be documented in this file. Take a look

* All the `completion` parameters of the `Navigator` APIs are removed.

### Fixed

#### Navigator

* [#325](https://github.com/readium/kotlin-toolkit/issues/325) Top EPUB selections no longer break when dragging the selection handles.


## [3.0.0-alpha.2]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ internal open class R2BasicWebView(context: Context, attrs: AttributeSet) : WebV
}

override fun onOverScrolled(scrollX: Int, scrollY: Int, clampedX: Boolean, clampedY: Boolean) {
// Workaround addressing a bug in the Android WebView where the viewport is scrolled while
// dragging the text selection handles.
// See https://github.com/readium/kotlin-toolkit/issues/325
if (isSelecting) {
return
}

if (callback != null) {
callback?.onOverScrolled(scrollX, scrollY, clampedX, clampedY)
}
Expand Down

0 comments on commit e42d495

Please sign in to comment.