1. 15 Oct, 2020 1 commit
    • Robert Knight's avatar
      Remove checks for IE 11 in `TagEditor` component · da788daf
      Robert Knight authored
      `TagEditor` tested if the browser was IE 11 to determine whether to
      check the `inputType` property of `InputEvent`. However it is not only
      IE 11 that did not support this property.
      
      From reading the comments in https://github.com/hypothesis/client/pull/1558 it
      appears that the `inputType` checks was originally added to resolve an
      issue with accepting suggestions by pressing Enter in an earlier version
      of `TagEditor` that used the `<datalist>` element. As far as I can tell
      this is no longer applicable. `<datalist>` was replaced by a custom UI
      and accepting suggestions by pressing Enter works without this logic.
      Therefore this commit removes it entirely.
      da788daf
  2. 14 Oct, 2020 8 commits
    • Robert Knight's avatar
      Fix `Promise.prototype.finally` polyfill loading in older browsers · 77478163
      Robert Knight authored
      The sidebar application failed to load in Safari 10 due to the ES 2018
      polyfill bundle, which contains a polyfill for
      `Promise.prototype.finally`, not being loaded in that browser.
      
      The issue was that 'es2018' was not listed in the polyfill bundles to
      build in `gulpfile.js` or in the list of bundles required by the sidebar
      app in `boot.js`.
      
      This commit fixes these issues and makes the issue less likely to occur
      in future by:
      
       - Removing the need to manually list each polyfill bundle in
         `gulpfile.js`. Instead the `src/shared/polyfills` dir is listed and
         every non-`index.js` file is used as the root of a bundle.
       - Factoring out the polyfills common to the sidebar and annotator app
         into a variable and including "es2018" there
      77478163
    • Robert Knight's avatar
      Remove `Element.closest` polyfill · 0fd302bd
      Robert Knight authored
      Element.closest is natively supported [1] by our minimum browser targets.
      
      [1] https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility
      0fd302bd
    • Robert Knight's avatar
      Fix `document.evaluate` feature test in Edge Legacy · 2e6b8a6e
      Robert Knight authored
      This API is available in Edge Legacy but with a quirk that arguments
      that are optional in the spec are required in this browser.
      
      This fixes an issue that the client would incorrectly abort startup in
      Edge Legacy with a warning that the browser is unsupported.
      2e6b8a6e
    • Robert Knight's avatar
      Remove `createNodeIterator` polyfill · 7545b9a2
      Robert Knight authored
      This polyfilled the optional-ness of the `filter` and deprecated
      `expandEntityRefrences` arguments of `document.createNodeIterator` in IE
      11, which is no longer supported.
      7545b9a2
    • Robert Knight's avatar
      Remove `document.baseURI` polyfill · 93d916b8
      Robert Knight authored
      This was only needed for IE 11, which is no longer supported.
      93d916b8
    • Robert Knight's avatar
      Remove `custom-event` polyfill · c837812e
      Robert Knight authored
      This was only needed for IE 11, which is no longer supported.
      c837812e
    • Robert Knight's avatar
      Remove `document.evaluate` polyfill · 9588558a
      Robert Knight authored
      This was only needed for IE 11, which is no longer supported.
      9588558a
    • Robert Knight's avatar
      Gracefully abort startup in old browsers · e1f314b3
      Robert Knight authored
      Run a series of feature tests at the very start of the boot process and
      abort with a console warning if they fail.
      
      We display a console warning rather than a louder warning to avoid being
      disruptive on sites maintained by publishers which embed Hypothesis and
      which still want to support older browsers. On those sites the
      Hypothesis annotation feature will simply be missing.
      e1f314b3
  3. 13 Oct, 2020 9 commits
  4. 12 Oct, 2020 6 commits
  5. 09 Oct, 2020 2 commits
    • Kyle Keating's avatar
      Fix mobile cursor from jumping to bottom · 3a28eddf
      Kyle Keating authored
      When selecting text on the android, it was possible to also highlight the text inside the buttons in the adder. When this happened, the range would grab everything from where you started to highlight to the very end of the dom because the adder is attached as the last node inside body.
      
      The simple fix is to prohibit text selection inside the adder which prevents the selection from getting the adder itself.
      3a28eddf
    • Lyza Danger Gardner's avatar
      Add a non-OCR'd PDF to the dev-server documents · 150e15b9
      Lyza Danger Gardner authored
      Add a non-OCR'd PDF available to the local dev server to aid
      developers
      150e15b9
  6. 08 Oct, 2020 4 commits
  7. 07 Oct, 2020 6 commits
  8. 06 Oct, 2020 4 commits
    • Lyza Danger Gardner's avatar
      Apply hover styling consistently to focused buttons · 484b4f11
      Lyza Danger Gardner authored
      The recently-added `button-hover` mixin, used by the base `button`
      mixin and thus inherited by other button mixins, applied hover styling
      to focused buttons, but other button mixins that adjust hover styling
      were not applying hover styling to focused buttons.
      
      Update mixins to consistently apply hovered styling to focused buttons
      
      Fixes #2610
      484b4f11
    • Kyle Keating's avatar
      Remove commented out assert.equal test · bf9a06fc
      Kyle Keating authored
      bf9a06fc
    • Robert Knight's avatar
      Handle case where `nodeFromXPath` returns a non-Element result · 275ea593
      Robert Knight authored
      Handle scenarios flagged by type checking where `nodeFromXPath` may
      return `null` or a non-Element node. Previously it could never return
      `null` but would throw an exception if the node was not found. In the
      new code a check is needed.
      
      The case where `nodeFromXPath` returned a non-Element node would never
      happen with XPaths generated by the client but could happen if an
      annotation was created via the API with a non-simple XPath.
      275ea593
    • Robert Knight's avatar
      Fix issue with `getTextNodes` and nodes from other iframes · 908c8159
      Robert Knight authored
      I don't believe this issue will ever occur in the real application, but
      we currently have tests (in `html-test.js`) where the passed node comes from
      a different iframe and therefore a different JS environment where globals including
      `Text` and `Element` have different identities.
      908c8159