readium / readium-js-viewer

👁 ReadiumJS viewer: default web app for Readium.js library
BSD 3-Clause "New" or "Revised" License
553 stars 186 forks source link

toolbar does not hide when table of contents (ToC) is visible #541

Open becka11y opened 8 years ago

becka11y commented 8 years ago

When the table of contents is visible the toolbar does not autohide nor can it be hidden using the keyboard shortcut, x.

This issue is a Bug

It could be debated that this is a feature. We just need to decide and document it properly.

Expected Behavior

Normally the toolbar will autohide after 6-10 seconds unless focus is on one of the buttons. If the toolbar is visible and focus is not on a button in the toolbar, it can be hidden by pressing the keyboard shortcut, x.

Observed behaviour

When the table of contents is open neither of these mechanisms work and the toolbar can not be hidden.

Steps to reproduce

  1. Open The Accessible EPUB 3 book (it happens with all the books I tested) make sure the Table of contents is NOT visible
  2. When the toolbar is NOT visible, press v to make it visible. Focus will be on the About button
  3. Set focus out of the toolbar by clicking outside of the toolbar (but within the readium app)
  4. Wait - the toolbar will disappear.
  5. With the toolbar is NOT visible, press v to make it visible. Focus will be on the About button
  6. Press x twice -the first time removes focus from the About Button, the second time hides the toolbar.
  7. With the toolbar NOT visible, Press t to open the table of contents. Focus is on the close button of the table of contents. The toolbar is displayed.
  8. Wait - the toolbar will never autohide
  9. Press x, the toolbar does not hide.

    Test file(s)

    Product

    • Readium Chrome extension
    • latest official version available from the Chrome Web Store - 2.23.0
    • Version of the Chrome browser - Version 51.0.2704.103 (64-bit)
    • OS and version - OS X 10.11.5
    • Readium cloud reader app 2.24.0-alpha Wed, 15 Jun 2016 15:16:04 GMT readium-js-viewer@39939d854bc27f945f26b9ffa265bdff8ccee35c readium-js@b32f9ebc23d98dd23bdbee9d485d4ad9e736afc1 readium-shared-js@91324db9ca2cb3b931761a115384f2328737103f readium-cfi-js@a9b07a78fa73215c624cdeb2047ab6dc49f81a7d
    • Browser and version - Safari Version 9.1.1 (11601.6.17)
    • OS and version - OS X 10.11.5
danielweck commented 8 years ago

Yes, this is (currently) a feature :)

Although I imagine this is probably not the most intuitive UX (?)

rkwright commented 8 years ago

Why would it be a feature? I.e. why should the behaviour of the toolbar be different when the TOC is open or closed? But perhaps you are just kidding... :-)

becka11y commented 8 years ago

FYI - it seems a conscious decision was made to NOT hide the toolbar when the TOC is open: var hideUI = function(){ hideTimeoutId = null; // don't hide it toolbar while toc open in non-embedded mode if (!embedded && $('#app-container').hasClass('toc-visible')){ hideLoop() return; }

in epubReader.js.

I'm guessing that decision was made to avoid having to deal with filling the background above the ToC when the toolbar hides(see the image) hiddentoolbartoc