1. 31 May, 2023 3 commits
    • Robert Knight's avatar
      3646deda
    • Robert Knight's avatar
      Correct `describe` block names · 2f1fc9e0
      Robert Knight authored
       - Use relative module path for the outer block name
       - The `#` prefix is reserved for methods
      2f1fc9e0
    • Robert Knight's avatar
      Normalize multi-range selections to a single range in Firefox · 6eb68bb6
      Robert Knight authored
      There are situations where Firefox creates a selection with multiple
      ranges, even though the spec forbids this. In various places in our code
      we called `selection.getRangeAt(0)` assuming there would only be one
      range. In the case where FF had created multiple ranges, this led to
      only part of the user's selection being respected.
      
       - Modifying the `selectedRange` utility to combine multi-range
         selections into a single Range, so that the results in Firefox are
         the same as in other browsers.
      
       - Replacing various direct calls to `selection.getRangeAt(0)` with
         calls to `selectedRange` so that they take get this normalization
         applied.
      
         In the tests for `Guest`, this led to refactoring to make some tests
         less tied to implementation details.
      
      Fixes https://github.com/hypothesis/client/issues/5485
      6eb68bb6
  2. 30 May, 2023 2 commits
  3. 29 May, 2023 8 commits
  4. 26 May, 2023 7 commits
  5. 25 May, 2023 19 commits
  6. 23 May, 2023 1 commit
    • Robert Knight's avatar
      Enable host page to respond async to `scrolltorange` event · fc3c29a4
      Robert Knight authored
      Add a `waitUntil` method to the `scrolltorange` event which allows the host page
      to signal to the client that it should wait for async work to complete before
      the client attempts to scroll to a highlight. This is useful in web applications
      which need to perform an async re-render of the UI before the content can be
      scrolled to.
      
      The initial use case is enabling Via's video player app to clear transcript
      search filters and re-render the Preact UI before scrolling to a highlight [1]
      
      [1] See https://github.com/hypothesis/via/pull/932.
      fc3c29a4