Releases: samuelbradshaw/highlight-helper-js
Releases · samuelbradshaw/highlight-helper-js
v0.4.0
- Added full support for custom selection handles when using a mouse or trackpad.
- Removed the
showSelectionHandles
setting. - Changed
snapToWord
to only modify the selection range when there’s an active highlight. - Fixed cases where nearby highlights or hyperlinks were unexpectedly activated when tapping in the margin.
- Fixed an issue that could prevent highlights from being created when tapping a color or style button in the demo.
- Fixed an issue where double-tapping a highlight could cause it to shrink to a single word in iOS Safari.
- Fixed an issue that could prevent the selection appearance from getting set correctly in Chrome.
Full Changelog: 0.3.0...0.4.0
v0.3.0
- Added support for multiple Highlighter instances on a page (as long as their containers don't overlap in the DOM tree), and updated the demo with an example.
- Improved behavior when selecting text that's not annotatable or is outside the annotatable container.
- Improved support for custom selection handles (still in an alpha state, and off by default).
- Improved resilience of code that calculates where to draw rectangles in SVG drawing mode.
- Fixed a bug where text could remain selected after deleting a highlight.
- Code style improvements (arrow functions and strict equality).
Full Changelog: 0.2.0...0.3.0
v0.2.0
- Improved default highlight colors and styles.
- Improved appearance of the demo disambiguation panel.
- Updated Highlight Helper to send
hh:tap
events on long press. - Added an
isLongPress
property to hh:tap details. - Added a
longPressTimeout
option to set timeout milliseconds (setting to 0 keeps previous Highlight Helper behavior, with no special handling of long press). - Fixed a bug on Android where links had a blue background color while long-pressing.
- Fixed a bug on Android where selected text would immediately deselect when trying to create a selection outside of the previous selection range.
- Added console warnings for invalid or incomplete colors, styles, and wrappers.
Full Changelog: 0.1.0...0.2.0
v0.1.0
- Improved appearance of read-only highlights.
- Switched to using CSS custom properties for color values.
- Refactoring to improve efficiency and loading speed.
Full Changelog: 0.0.2...0.1.0
v0.0.2
- Changed default drawing mode to
svg
. - Changed default pointer mode to
auto
for better Apple Pencil and stylus support. - Added
inserted-spans
drawing mode (sets all highlights to read-only). - Improved appearance of active SVG highlights (active highlight now "darkens" by setting the selection color to transparent, and duplicating the SVG shape).
- Updated snap-to-word to treat dashes as word boundaries.
- Improved performance and added a load test page (loads ~3500 highlights in 2–5 seconds, depending on the device).
- Fixed a console error when choosing a color or style before selecting text.
- Fixed a bad state if the user selects only a space or dash and snap-to-word collapses it to 0 characters.
- Fixed a fragile default paragraph selector that could allow paragraphs without IDs to be annotated.
- Fixed an issue where the demo disambiguation panel dismissed itself in Android Chrome if the user tapped in the wrong place.
- Fixed an issue where
hh:tap
was sometimes sent when the user was dragging or long-pressing to select text.
Full Changelog: 0.0.1...0.0.2
v0.0.1
Renamed "default" pointerMode to "simple"