]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commit
Fixed Magellan issue when target does not exist. 9070/head
authorMarius Olbertz <marius.olbertz@gmail.com>
Sat, 30 Jul 2016 20:05:47 +0000 (22:05 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Sat, 30 Jul 2016 20:05:47 +0000 (22:05 +0200)
commit3cd1b0d1fcef12e58c460f40884ab61cedc54013
tree7eaeea7fdab2a87dc099289a84f5d4a717917295
parent87f08d9ee4f99ec5bbc8f39d215f91a92630e849
Fixed Magellan issue when target does not exist.

Prevent any scrolling action when the target of the clicked link does not exist.
Previously the `.getOffset().top` created an JS error because `Cannot read property 'top' of undefined`.
Also added a basic test for scrolling and a test for the graceful failing when the target does not exist.
js/foundation.magellan.js
test/javascript/components/magellan.js