-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Previous/next page arrow buttons are hidden, but associated commands are enabled (invokable by keyboard shortcuts and access keys) => problematic with non-linear spine items #188
Comments
It's not needed for v1 so we won't do it. I am also in favor of 1, but want to spend a little time thinking/discussing it and we're out of time. But thanks for raising the issue. |
@rkwright just to make sure I understand correctly: does this mean that we should now re-enable the left/right buttons when displaying a non-linear spine item document (i.e. option 2)? |
Related issue (non-linear ancillary document has multiple pages, yet previous/next page buttons are always disabled): |
Good catch. But this illustrates why I don't want to touch it this week. Let's get the GM out then do some serious thinking and documenting of all the wrinkles. |
Fixed in PR: #402 |
May I know how to disable the Previous and Next buttons in Readium using javascript? |
@muyarkyawwin See: var updateUI = function(pageChangeData){
if(pageChangeData.paginationInfo.canGoLeft())
$("#left-page-btn").show();
else
$("#left-page-btn").hide();
if(pageChangeData.paginationInfo.canGoRight())
$("#right-page-btn").show();
else
$("#right-page-btn").hide();
} |
To reproduce:
(1) navigate to a non-linear spine item (via the TOC or an content-embedded hyperlink) => the left/right arrow buttons are correctly hidden.
(2) use the arrow keys to switch page => the non-linear XHTML document should be "trapped" as if it were represented in a modal dialog, but the page switches unexpectedly.
Suggested solutions:
(1) disable the actual page turn command, not just visually hide the buttons. Consequently though, the user would need to be able to navigate back to the previous document CFI location (i.e. which was displayed when the hyperlink to the non-linear document was activated). iBooks implements a proper modal dialog, with a "close" cross icon to discard the fullscreen popup overlay. In Readium however, another type of UI affordance needs to be introduced in order to achieve a similar effect. I'm not sure how, but accessibility is paramount, as non-linear documents are often used for ancillary content descriptions. Thoughts? (this would need to be implemented in v1, otherwise non-linear spine items would be like "trapping" blackholes!)
(2) enable both page arrow buttons when navigating to a non-linear document. This way, we revert back to the original behaviour and we decide to tackle the problem in v1+, see:
readium/readium-shared-js#26
I have a preference for (1), but I am not sure whether this development task is achievable within the v1 timeframe. @rkwright ?
The text was updated successfully, but these errors were encountered: