dimsemenov/PhotoSwipe
JavaScript image gallery for mobile and desktop, modular, framework independent
📋 Changes
- Bugfix: an empty slide may appear if there are 3 slides in total and the user swiped through 4 slides rapidly https://github.com/dimsemenov/PhotoSwipe/issues/2103
- Remove restriction of typesVersion to 4.7 https://github.com/dimsemenov/PhotoSwipe/pull/2078
📋 Changes
- `dataSource` param is now optional for `PhotoSwipeLightbox.loadAndOpen` method, the first gallery is chosen if it's not provided.
- @BeeMargarida made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2069
📋 Changes
- Added `trapFocus` option (by default PhotoSwipe traps tab focus within the dialog, this option allows disabling the functionality) https://photoswipe.com/options/#trapfocus
- Added `preventPointerEvent` filter (by default PhotoSwipe calls `e.preventDefault()` during pointer-move events, this filter allows you to disable it over certain elements) https://photoswipe.com/filters/#preventpointerevent
Fix: lower version browsers do not support nullish-coalescing syntax https://github.com/dimsemenov/PhotoSwipe/commit/28baa3d0ee356ddf516d1b6c231bb9608ab9b171
📋 What's Changed
- fix: lower version browsers do not support optional chain syntax by @zt123123 in https://github.com/dimsemenov/PhotoSwipe/pull/2058
✨ New Contributors
- @JPustkuchen made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2053
- @hzpeng57 made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2055
- @zt123123 made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2058
- Full Changelog: https://github.com/dimsemenov/PhotoSwipe/compare/v5.3.8...v5.3.9
📋 Changes
- Removed `navigator.onLine` check so the gallery can be used while offline
- Added custom contentRemove handler to `<picture>` example by @solemone in https://github.com/dimsemenov/PhotoSwipe/pull/2031
📋 Changes
- Typescript fix: add missing type parameter constraints by @Rugvip in https://github.com/dimsemenov/PhotoSwipe/pull/2028
- Docs update: webp example, update custom-content.md by @thomasnavarro in https://github.com/dimsemenov/PhotoSwipe/pull/2024
✨ New Contributors
- @Rugvip made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2028
- @thomasnavarro made their first contribution in https://github.com/dimsemenov/PhotoSwipe/pull/2024
- Full Changelog: https://github.com/dimsemenov/PhotoSwipe/compare/v5.3.6...v5.3.7
📋 Changes
- Fixed an issue that caused lazy-loading of the full image (from `src`) rather than `srcset`. This problem was caused by the prev release (5.3.5).
- Use `classList.toggle` where possible by @hirasso in https://github.com/dimsemenov/PhotoSwipe/pull/2008
📋 Changes
- Fix rtl issues by @Mister-Hope in https://github.com/dimsemenov/PhotoSwipe/pull/2007
- Fix types and strictNullChecks by @Tw1N88 in https://github.com/dimsemenov/PhotoSwipe/pull/2009
📋 Changes
- added ARIA attributes to follow 'carousel' pattern,
- set/unset aria-hidden according to active slide,
- set id=pswp__items, and ensure buttons have aria-controls pointing to it
📋 Changes
- Fix unhandled rejection "EncodingError: The source image cannot be decoded" ([by Tw1N88](https://github.com/dimsemenov/PhotoSwipe/commit/6ef9962c1dcc1efbc845b4d3abccae0cc65ec05c))
- Fix typo in attribute name ([by Tw1N88](https://github.com/dimsemenov/PhotoSwipe/commit/6ef9962c1dcc1efbc845b4d3abccae0cc65ec05c))
- Fix Cannot read properties of undefined (reading 'applyCurrentZoomPan') ([by Tw1N88](https://github.com/dimsemenov/PhotoSwipe/commit/6ef9962c1dcc1efbc845b4d3abccae0cc65ec05c))
- Fix (types) change types of children & gallery options according to docs ([by Schleuse](https://github.com/dimsemenov/PhotoSwipe/pull/1982))
📦 5.3.2
- [Replace package.json exports "import" by "default"](https://github.com/dimsemenov/PhotoSwipe/commit/1b74c5ba8427a69c5fc1ab576695acbb8b7d45df)
📦 5.3.1
- [Reuse placeholder of content is cached](https://github.com/dimsemenov/PhotoSwipe/commit/e22bd285adb6324444c728099a17c6d3f56bacd3)
📦 5.3.0
- [Adjust zoomed-in class behaviour to reflect toggleZoom method,](https://github.com/dimsemenov/PhotoSwipe/commit/458cb0f373bb6e5b1a2b0482069bb13eab53670c) https://github.com/dimsemenov/PhotoSwipe/issues/1946
- [Remove placeholder after image is loaded](https://github.com/dimsemenov/PhotoSwipe/commit/311ed1fdb4d678efab164bacd085fc9bb433585c)
- [Allow PhotoSwipeBase for lazyLoadData method](https://github.com/dimsemenov/PhotoSwipe/commit/1d6080f4999635a54c3817b326a5dece893a6fd8)
- [Append image only after it's fully loaded in Safari](https://github.com/dimsemenov/PhotoSwipe/commit/27c079cfa2677fc6569134ff16d7817d8ec06940)
- [Set sizes before srcset](https://github.com/dimsemenov/PhotoSwipe/commit/13f18e5497d9234b3e9851a0a8f76bcd43015af0)
- [Size of content is now calculated before it's appended to DOM](https://github.com/dimsemenov/PhotoSwipe/commit/4bb8a7ed361ff91e135d976b0165875fdbe27adc)
- [Allow PhotoSwipeBase type for loader](https://github.com/dimsemenov/PhotoSwipe/commit/266c7b265c4dc7312c6ce90f48872ccc397e5453)
- [Replace innerHTML to preserve Trusted Types](https://github.com/dimsemenov/PhotoSwipe/commit/ddcad46f10f9dbbfd3656c3425b8b8a15699f704)
- + 1 more
✨ What's new
- Code quality and rewrite in ES6
- The script is now distributed as an ES module and does not require a build step to use.
- Simpler initialization and dynamic import support
- PhotoSwipe now supports dynamic import and does not block page rendering.
- ```
- <script type="module">
- import Lightbox from './photoswipe-lightbox.esm.js';
- const lightbox = new Lightbox({
- + 22 more
This minor patch fixes issue with devices that have multiple types on input, running Windows 10 and Chrome (#1579). Larger update with improvements of API, certain parts of PhotoSwipe UI and functionality will hopefully be released in a near future ([subscribe to get notified by email](http://dimsemenov.com/subscribe.html)).
Fix: iOS 10.3 not updating layout after orientaton change in some cases. For more details please refer to issue https://github.com/dimsemenov/PhotoSwipe/issues/1315#issuecomment-291897591
📋 Changes
- Fix: click on inline SVG in slide or controls causes error "SvgAnimatedString no className".
- Fix: Firefox 42 not rendering nearby images sometimes, issue #1014.
- Disabled native fullscreen option entirely in old versions of Android
- Added option `fitControlsWidth` for the default UI (default was not changed – 1200px), issue #1021.
📋 Changes
- `closeOnScroll` is now blocked if animations are running or gesture is performed.
- Horizontal dragging direction is forced if previous swipe transition wasn't finished.
- Reduced duration of transition that finishes zoom gesture (300 to 200ms).
- `verticalDragRange` default value increased from 0.6 to 0.75.
- Reduced default maximum spread and double tap zoom level from 2x and 1.5x to 1.33x.
📋 Changes
- Added ability to use custom identifiers for the slides in the URL, for example: `http://example.com/?gid=1&pid=your-custom-gallery-item-uid`. More info in [FAQ section of docs](http://photoswipe.com/documentation/faq.html#custom-pid-in-url). (via @csu & @kyleder).
- Added vertical drag range option (`verticalDragRange`) (via @v-yanchevsky).
- Added ability to control size of PhotoSwipe viewport (it doesn't have to fill 100% width and height of window). More info in [FAQ section of docs](http://photoswipe.com/documentation/faq.html#inline-gallery).
- Fix: partly broken preloader animation when `direction:rtl`.
📋 Changes
- Fix: slow wheel scroll on Windows Firefox (#730).
- Fix: wrong image size when it's smaller than PhotoSwipe viewport in IE8.
- Fix: freeze in Ubuntu Firefox 36 (#783), only CSS file changed.
- Added SVG support: image size is forced to defined "w" & "h" properties of slide object. See [demo](http://codepen.io/dimsemenov/pen/yyQrYv).
- Update `bower.json` `main` array with default ui (via @inlikealion).
- Lazy-loading when using responsive images: allow item alteration before checking validity (via @DanielMuller).
📋 Changes
- Fix: incorrect zoom pan position in fullscreen when page was scrolled.
- Fix: fullscreen icon is not updating when changing fullscreen state.
- Fix: orientation change breaks layout if there are 2 slides.
- Fix: error when image finished loading (can appear only when low number of items and when rapidly switching
- Fix: issue with RTL layouts (via @louy).
- Fix: error appears when `captionEl:false`.
- `closeOnScroll` is now triggered only by mousewheel events and only in browsers that support transform. As various browsers trigger scroll event unpredictably (during page load, when bars appear, etc.).
- Fix: in desktop Safari PhotoSwipe that opens on page load can close (caused by above issue).
- + 2 more
📋 Changes
- Reset idle timer on controls click.
- Hide share modal when slides change.
- Added `clickToCloseNonZoomable` option.
- Bugfix: error when replacing slide dynamically.
- Removed minZoom and maxZoom properties from slide object.
📋 Changes
- Fix: dynamic adding/removing slides issue.
- During zoom/pan image position is now rounded (#704). Not rounded position could cause not sharp image on high-dpi screens
- Hide arrows and counter if there is only one slide.
- Prevent page scroll if `closeOnScroll:false`.
- Added options that allow to parse share links output.
- Added event that triggers when share link is clicked.
- Configurable zoom level for double-tap zoom.
- Prettified, commented and structured Sass files.
- + 1 more
📋 Changes
- Now you can add HTML content in slides, [more info in documentation](http://photoswipe.com/documentation/custom-html-in-slides.html).
- Fix: links trigger during or after drag gesture.
- Allow dragging or panning only via left mouse button.
- Double tap zooms to 1.5x if initial zoom is less than 0.7x.
- Force paint on bg and root element (opening transition).
📋 Changes
- Fix: in IE8 3rd image not always appended.
- Minified assets (images, svg).
- Improved keyboard events handling. `Esc` key handler moved to `keydown`. `Keyup` listener removed entirely. Added `e.preventDefault()` to keyboard events.
- Fix: commonjs/browserify issue.
- Improved Sass files, added Autoprefixer, path to assets can be configurable.
- Fix: in old Android (<4.4) tap event could trigger twice.
