Closed dwp-forge closed 9 years ago
There's been a number of similar reports and few of them have fixes, but some of them
I just couldn't reproduce and track down. If you know your way around Javascript and
have some spare time you could try to debug it yourself. Or if you really want to get
this fixed but lack the skills, we could do some remote debugging (for example, see
issue 20).
Original issue reported on code.google.com by dwp-forge
on 2013-10-18 08:44:34
I've tracked down the issue to an incompatibility with the following custom JavaScript
in userscript.js, but I lack the chops to figure out why. I'm willing to do some debugging
to try and figure it out.
jQuery(function(){
var scrollerTopMargin = jQuery(".desktop #dokuwiki__aside").offset().top;
jQuery(window).scroll(function(){
var c = jQuery(window).scrollTop();
var d = jQuery(".desktop #dokuwiki__aside");
if (c > scrollerTopMargin) {
d.css({ position: "fixed", top: "1em" });
} else if (c <= scrollerTopMargin) {
d.css({ position: "relative", top: "" });
}
});
});
Original issue reported on code.google.com by celticmadman
on 2013-10-18 16:23:14
Reproduced.
Original issue reported on code.google.com by dwp-forge
on 2013-10-19 11:26:55
Apparently sidebar is not shown in admin interface, so you have to take that into account
in your user script. Replace the first line in the function by the following:
var aside = jQuery(".desktop #dokuwiki__aside");
if (aside.length == 0) return;
var scrollerTopMargin = aside.offset().top;
Otherwise .offset() doesn't return anything and you call .top on an undefined object.
The resulting exception breaks execution of the remaining callbacks, so RefNotes never
gets a chance to initialize.
Original issue reported on code.google.com by dwp-forge
on 2013-10-19 12:08:52
Thank you for that! I've made the change to my script. Everything works as expected
now.
Original issue reported on code.google.com by celticmadman
on 2013-10-19 15:29:33
Original issue reported on code.google.com by
celticmadman
on 2013-10-17 21:39:19