1. 04 Oct, 2021 1 commit
    • Robert Knight's avatar
      Add mock VitalSource book reader to dev server · dc943828
      Robert Knight authored
      This adds a mock version of the VitalSource Bookshelf reader to the dev
      server. It includes only the essential aspects of the viewer's structure that
      will trigger VitalSource-specific functionality.
      dc943828
  2. 30 Sep, 2021 7 commits
  3. 29 Sep, 2021 2 commits
  4. 28 Sep, 2021 1 commit
  5. 27 Sep, 2021 13 commits
  6. 22 Sep, 2021 4 commits
  7. 20 Sep, 2021 7 commits
  8. 16 Sep, 2021 3 commits
    • Eduardo's avatar
      Minor improvements following PR feedback · 9e4a4717
      Eduardo authored
      * check that the iframe's `src` element is not 'about:blank'.
      * use EventTarget class and fake DOM element for tests
      * fix typos
      9e4a4717
    • Eduardo Sanz García's avatar
      Complete testing of the onDocumentReady function · 8575eb96
      Eduardo Sanz García authored
      I removed the `/* istanbul ignore test */` and created a facade to
      emulate and iframe for testing.
      8575eb96
    • Eduardo Sanz García's avatar
      Improve the logic that checks for iframe's document ready · 919e5bf1
      Eduardo Sanz García authored
      In certain situations, the logic to check when the iframe's document is
      ready didn't work as expected. The reason for that is that browsers
      create an initial blank document before the actual document loads.
      This blank document has a `readyState` of 'complete' in Safari and
      Chrome and of 'uninitialized' in Firefox. This blank document can be
      mistaken by the final document. I was able to reproduce a situation
      where the Hypothesis client was injected into the blank document. Then,
      the blank document was replaced by the actual document and the
      Hypothesis client was not not longer embedded.
      
      In addition, this commit:
      
      * renames `frame` to `iframe` (only in the test)
      * renames `_handledFrames` to _annotatableFrames`
      * removes `isAccessible` (no longer neede)
      919e5bf1
  9. 15 Sep, 2021 2 commits
    • Robert Knight's avatar
      Tweak comment · f7f8e24f
      Robert Knight authored
      Add commas for readability
      Co-authored-by: 's avatarLyza Gardner <439947+lyzadanger@users.noreply.github.com>
      f7f8e24f
    • Robert Knight's avatar
      Prevent sidebar controls overlapping scrollbar in PDFs · 32cea8cc
      Robert Knight authored
      When the sidebar is closed or there is not enough room to show the
      sidebar alongside the PDF content, reserve space for the sidebar's
      toolbar and bucket bar. This fixes an issue where the sidebar's controls
      would overlap the document's scrollbar, making scrolling the PDF less
      convenient, especially in long documents.
      
      This also removes the need for some CSS overrides that reposition
      elements in PDF.js's toolbar. By ensuring that the `<body>` does not
      overlap the sidebar controls, the PDF.js toolbar which is contained
      within the body doesn't either.
      
      Fixes #3759
      32cea8cc