---
area: "Changes"
parent: "Changes"
url: "https://unpoly.com/changes/2.6.0"
released: "2022-05-12"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [Changes](https://unpoly.com/changes.md)</nav>

# Version 2.6.0

Released on May 12, 2022 with [19 commits](https://github.com/unpoly/unpoly/commits/v2.6.0)

This is a final maintenance release before Unpoly's next major feature drop in a few weeks.

<nav aria-label="Contents">

- [Polling](#polling)
- [Overlays](#overlays)
- [Scrolling](#scrolling)
- [Various changes](#various-changes)
- [Upgrading](#upgrading)

</nav>

## Polling {#polling}

The [polling](https://unpoly.com/api/up-poll.md) implementation was rewritten to fix many issues and edge cases:

- Fix a bug with [`[up-poll]`](https://unpoly.com/api/up-poll.md) reloading very fast when the server responds with an [`X-Up-Target: :none`](https://unpoly.com/api/X-Up-Target.md) header (fixes [#377](https://github.com/unpoly/unpoly/issues/377)).
- Polling fragments now emit an [`up:fragment:poll`](https://unpoly.com/api/up:fragment:poll.md) event before every update. Listeners may prevent this event to skip the update.
- Programmatically starting to poll with [`up.radio.startPolling()`](https://unpoly.com/api/up.radio.startPolling.md) no longer requires the server to respond with an [`[up-poll]`](https://unpoly.com/api/up-poll.md) attribute.
- The function [`up.radio.startPolling()`](https://unpoly.com/api/up.radio.startPolling.md) no longer causes duplicate requests when an element is already polling.
- Fix a memory leak where polling elements would sometimes continue to maintain a timer (but not send requests) after they were removed from the DOM.
- The server can now stop a polling element by sending a matching element without an [`[up-poll]`](https://unpoly.com/api/up-poll.md) attribute.
- The server can now change the polling interval by sending a matching element with a different `[up-interval]` attribute.
- The server can now change the URL from which to poll by sending a matching element with a different [`[up-source]`](https://unpoly.com/api/up-source.md) attribute.

## Overlays {#overlays}

- Events for [closing overlays](https://unpoly.com/learn/closing-overlays.md) ([`up:layer:dismiss`](https://unpoly.com/api/up:layer:dismiss.md), [`up:layer:dismissed`](https://unpoly.com/api/up:layer:dismissed.md), [`up:layer:accept`](https://unpoly.com/api/up:layer:accept.md), [`up:layer:accepted`](https://unpoly.com/api/up:layer:accepted.md)) have gained new useful properties:
  - The `{ value }` property is the [overlay result value](https://unpoly.com/learn/closing-overlays.md#result-values).
  - The `{ origin }` property is the element that caused the overlay to close.
- When an overlay is [closed](https://unpoly.com/learn/closing-overlays.md) its [result value](https://unpoly.com/learn/closing-overlays.md#result-values) is now [logged](https://unpoly.com/api/up.log.md) for easier debugging.
- Fix many issues where clicking into foreign overlays constructed by other libraries would close an underlying Unpoly modal. In many cases this is no longer necessary. There are some remaining cases where Unpoly would steal focus from a foreign overlay. These can be fixed by attaching the foreign overlay to the Unpoly overlay's element. The next Unpoly version will ship a more comprehensive solution for this.
- Published a configuration option [`up.layer.config.overlay.class`](https://unpoly.com/api/up.layer.config.md#config.overlay.class). It can be used to configure a default HTML class for an overlay's container element.

## Scrolling {#scrolling}

- Viewports within a [`[up-keep]`](https://unpoly.com/api/up-keep.md) fragment now retain their scroll positions during a fragment update.
- The option for [revealing](https://unpoly.com/api/up.reveal.md) a fragment without animation is now `{ behavior: 'instant' }` instead of `{ behavior: 'auto' }`.
- Fix an issue where Unpoly would prevent the browser's restoration of scroll positions when the page was reloaded (closes [#366](https://github.com/unpoly/unpoly/issues/366) #65).

## Various changes {#various-changes}

- [`up.element.createFromSelector()`](https://unpoly.com/api/up.element.createFromSelector.md) and [`up.element.affix()`](https://unpoly.com/api/up.element.affix.md) now also accept a `{ style }` option with a string value. It previously only accepted an object of camelCased CSS properties.
- [`up.request()`](https://unpoly.com/api/up.request.md) will automatically choose a layer based on a given `{ origin }`.
- Remove duplicate logging of exceptions to the error consoles.
- The experimental function `up.fail()` has been removed from public API.
- Documentation fixes.

## Upgrading {#upgrading}

If you're upgrading from an older Unpoly version you should load [`unpoly-migrate.js`](https://unpoly.com/changes/upgrading.md) to polyfill deprecated APIs. Changes handled by `unpoly-migrate.js` are not considered breaking changes.

See our [upgrading guide](https://unpoly.com/changes/upgrading.md) for details.

