Skip to content

Releases: mitranim/simple-pjax

0.3.0

07 Nov 18:23
Compare
Choose a tag to compare

Now emits a special event before replacing the document, giving you the hook to perform cleanup, like unmounting React components (turns out we need to do that). The event name is simple-pjax-before-transition.

Breaking: the after-transition event is now simple-pjax-after-transition, rather than DOMContentLoaded like before.

In short:

  • perform cleanup on simple-pjax-before-transition
  • set up the DOM on simple-pjax-after-transition

0.2.9

18 Oct 20:19
Compare
Choose a tag to compare

Fixed a bug that would incorrectly execute inline scripts containing document.write calls (e.g. when using browser-sync).

0.2.8

18 Oct 15:49
Compare
Choose a tag to compare

Finally fixed the issue where after a pjax transition, inline scripts would fail to execute in Webkit browsers (i.e. Safari on OS X and iOS). Now this works consistently across browsers.

0.2.6

11 Oct 07:15
Compare
Choose a tag to compare

Fixed .npmignore.

Clicking a link leading to the current page no longer scrolls the page up.

0.2.5

02 Oct 11:15
Compare
Choose a tag to compare

The DOMContentLoaded event is now dispatched before adjusting scroll position.

If pjax.scrollOffsetSelector is configured, the library will quietly adjust the scroll position during hash transitions on the same page, i.e. when <a href="#something"> is clicked. This is done without ajax, and the only difference from native hash transitions is that the scroll position is offset by the height of the given fixed-positioned element (i.e. the navbar). In addition, clicking a non-hash link leading to the current page will scroll the page up, iOS-style.

In Blink, popstate transitions (clicking back and forward buttons) between different pages no longer cause the scrolling position to change twice.

0.2.4

27 Sep 10:44
Compare
Choose a tag to compare

Fixed bower.json.

0.2.3

24 Sep 20:32
Compare
Choose a tag to compare

Now correctly ignores links to the same page, unless they have the data-force-reload attribute.

0.2.2

24 Sep 11:12
Compare
Choose a tag to compare

Added an option to disable pjax globally.

0.2.1

24 Sep 08:25
Compare
Choose a tag to compare

Fixed global export in non-commonjs environments.

0.2.0

24 Sep 08:11
Compare
Choose a tag to compare

Minor breaking change: compiled files are now in dist rather than lib.

In addition to configuration, now exports a method that refreshes the current page by doing a pjax transition to it.