Behind The Math
dddb4dd2fb
Fix documentation for currentUrlFullReload
2018-04-09 23:31:02 -04:00
Behind The Math
494f1f35ac
Bug fixes
2018-04-09 23:31:02 -04:00
Behind The Math
ee82d0e0c7
Fix bug when checking if elements were parsed already
...
parse-element.js checks if the element was already parsed by
checking for the `data-pjax-click-state` attribute. However, this
attribute was not added until the link is clicked.
Originally, there was a separate attribute, `data-pjax-enabled`,
which tracked if the element was parsed already, but that was
changed in 9a86044 .
This commit merges the attributes for mouse clicks and key presses
into one and adds that attribute when the element is initially
parsed.
2018-04-09 23:31:02 -04:00
Robin North
688810fbae
Add tests for lib/util/noop.js
2018-04-09 23:30:57 -04:00
Behind The Math
17d8262025
Add X-PJAX-Selectors header
2018-04-09 23:28:46 -04:00
BehindTheMath
75eb83dbc2
Add replaceNode switch ( #141 )
...
* Add replaceNode switch
* Add test for replaceNode()
* Update TS definitions
2018-03-20 10:52:55 -04:00
BehindTheMath
5e41a32cf4
Add Typescript definitions ( #138 )
...
* Add Typescript definitions
* Add test file for TS
2018-03-15 21:16:11 -04:00
Behind The Math
a2982cfcba
Edit README to assign the Pjax instance to a variable
2018-03-15 16:38:03 -04:00
BehindTheMath
2166866967
Handle XHR response error ( #137 )
...
* Move the XHR callback to a separate file
* Trigger an error event if the response cannot be parsed.
* Add tests for handle-response.js
2018-03-15 16:12:32 -04:00
Robin North
c1e5bf9c78
Update README
2018-03-15 09:15:13 +00:00
Behind The Math
333ee344f4
Fix bug in contains() argument list
...
Fixes #135
2018-03-09 09:32:58 -05:00
Robin North
05fa833169
loadUrl enhancements (#134 )
...
`loadUrl` enhancements
- Make `options` parameter optional
- Allow partial overriding of instance options when calling `loadUrl` directly
- Make `requestOptions` optional
- Document `loadUrl` usage and provide examples
2018-03-06 10:06:38 +00:00
Robin North
f98f2dd63b
Add tests for update-query-string
2018-03-04 15:12:53 +00:00
Robin North
07baae8e4d
Fix form submission ( #129 )
...
* Fix check for radio and checkbox inputs
* Fix GET form submission
* Add example forms for testing
* Refactor query string building
2018-03-02 20:25:08 +00:00
Maxime Thirouin
0c7af354fd
Update README.md
2018-02-09 14:12:12 +01:00
BehindTheMath
2d210c3305
0.2.5 ( #121 )
...
* Bump version to 0.2.5
* Update CHANGELOG
0.2.5
2018-02-02 11:12:27 -05:00
BehindTheMath
a72880d205
Code cleanup ( #120 )
...
* Lots of code cleanup
* Cleanup parse-options tests
- Rename objects for clarity and inline unneeded objects
- Remove unneeded tests
- Use Object.keys().length instead of a custom function
- Use typeof === "object" instead of a custom function that checks the prototype tree as well, since we don't expect anything but an object literal.
* Remove old switchFallback code
* Remove polyfill for Function.prototype.bind
* Inline small functions
* Add more documentation and tests for options.currentUrlFullReload
Closes #17
* Update package.json
2018-02-02 09:52:44 -05:00
BehindTheMath
57aed828ac
Merge pull request #118 from MoOx/fix/external-scripts-events
...
Fix external scripts events
2018-01-31 16:46:28 -05:00
Robin North
63bc2af226
Remove redundant comment
2018-01-29 20:06:33 +00:00
Robin North
20e987929e
Merge pull request #116 from MoOx/fix/blur
...
Fix element blurring (removing focus). Closes #4 .
2018-01-29 20:03:24 +00:00
Behind The Math
90d26d641c
Remove focus from form elements as well.
2018-01-29 13:51:00 -05:00
BehindTheMath
93c0a5bb9b
Merge pull request #119 from MoOx/feature/scroll-restoration
...
Opt in to manual scroll restoration in browsers that support it
2018-01-29 09:27:50 -05:00
Robin North
8718da35c6
Opt in to manual scroll restoration in browsers that support it
2018-01-28 14:35:25 +00:00
Robin North
31e1e7e405
Enable test for document.write in eval'd scripts
2018-01-26 15:54:07 +00:00
Robin North
05163d9fb5
Stop dispatching extraneous pjax:complete events, correct typo
2018-01-26 15:53:07 +00:00
Robin North
a15c94c55a
Merge pull request #113 from MoOx/cleanup/analytics
...
Cleanup default analytics function
2018-01-25 07:50:59 +00:00
Behind The Math
2d4df39f72
Remove a redundant call to .blur()
2018-01-24 20:19:02 -05:00
Behind The Math
fa05e94f07
Only blur element if it's contained by one of the selectors
...
Previously, Pjax would blur (remove focus) from the active element
regardless of where it was on the page. This restricts that to
happen only if the active element is contained by one of the
elements represented by options.selectors, because only those are
affected by Pjax.
Fixes #4
2018-01-24 20:18:41 -05:00
BehindTheMath
e3df2b1c3d
Merge pull request #114 from MoOx/fix/abort-pending-xhr
...
Abort previous pending XHR when navigating
2018-01-24 18:54:33 -05:00
Robin North
01fb72ceeb
Simplify options assignment
2018-01-24 23:40:05 +00:00
Robin North
f642eec047
Preserve ability to disable analytics behavior, explicitly document this option
2018-01-24 23:38:34 +00:00
Robin North
cc384b9b16
Improve check for analytics function option
2018-01-24 23:35:45 +00:00
Robin North
f559ca2914
Cleanup default analytics function
2018-01-24 23:35:45 +00:00
Robin North
137322543c
Explicitly flag if aborting a request fails due to request completing
2018-01-24 23:20:36 +00:00
Robin North
f7f68b2e50
Fix module filename
2018-01-24 23:15:40 +00:00
Robin North
ff62289683
Make use of new noop module
2018-01-24 14:51:16 +00:00
BehindTheMath
3205596f3e
Merge pull request #115 from MoOx/feature/minify
...
Add a minified version of Pjax to NPM
2018-01-24 08:48:23 -05:00
Behind The Math
3c8cd087c5
Use double quotes in CLI arguments
...
Single quotes don't work in all environments.
2018-01-23 19:40:13 -05:00
Behind The Math
12f3be21fb
Exclude pjax.min.js fom JSCS
2018-01-23 19:35:18 -05:00
Behind The Math
b74fbc4178
Add a minified version of Pjax to NPM
...
Fixes #108 .
2018-01-23 17:53:10 -05:00
BehindTheMath
8fcef04c9e
Merge pull request #112 from timtrinidad/master
...
Use a local clone of options when initiating requests, so requestOptions don't persist
2018-01-23 15:44:26 -05:00
Tim Trinidad
feb85382f2
Revert back to using '**' glob for tests, wrap in quotes to force node to parse the args
2018-01-23 15:05:31 -05:00
Tim Trinidad
f196604d73
Add tests to ensure options are not accidentally modified
2018-01-23 13:22:48 -05:00
Tim Trinidad
526a0883a2
Clone options in attach-link to prevent requestOptions changes from persisting
2018-01-23 13:22:31 -05:00
Robin North
486ef0e0ba
Abort previous pending XHR when navigating
2018-01-23 15:25:56 +00:00
Behind The Math
6000ad5620
Restore the trigger for the resize and scroll events to onSwitch
2018-01-22 20:42:57 -05:00
BehindTheMath
9845244948
Merge pull request #111 from MoOx/fix/scroll
...
Enhance scrolling behavior
- Save scroll position with history
- Scroll to element position when URL contains a hash
- Add scrollRestoration option
2018-01-22 20:32:57 -05:00
Behind The Math
e7935d9c74
Add scrollRestoration option
2018-01-22 18:56:22 -05:00
Tim Trinidad
e4b3952589
Clone options before modifying it for form submissions
2018-01-22 18:32:28 -05:00
Behind The Math
546b9abba3
Small bug fix
2018-01-22 17:32:59 -05:00