You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// increase sidebar length to match content (desktop mode only)
var $sidebar = jQuery('.desktop #dokuwiki__aside');
if($sidebar.length) {
var $content = jQuery('#dokuwiki__content div.page');
$content.css('min-height', $sidebar.height());
}
It increase content's frame length, not sidebar.
And in this time several elements do not have actual height value.
As result content's frame height have incorrect value (too large).
Workaround: Do this after browser page rendering done.
jQuery(document).ready(function() {
var bugfix = function() {
var $sidebar = jQuery('.desktop #dokuwiki__aside');
var $content = jQuery('#dokuwiki__content div.page');
$content.css('min-height', $sidebar.height());
};
setTimeout(bugfix,1);
});
The text was updated successfully, but these errors were encountered:
The original code's intention was to make the sidebar and content areas the same height to make it more visually pleasing. Your fix would only fix that the content area is too high but it introduces a new issue that the content area doesn't grow after the collapsed elements are expanded in the sidebar.
I would say this is an edge case as it only happens when you have collapsed elements in the sidebar. Or do you know of other cases?
But as a result the height of the content area is a much greater than the height of the sidebar.
It is not a fix. It is workaround exclusively for my case on my site.
No! I don't know of other cases.
And in my case there is workaround.
But there is a bug and I just reported about it.
In this particular case, the program would not work as it would like.
I proposed a solution. And that's not the fix. This is an example of how I solved the problem in my case specifically.
As a fix, I would suggest to remove this piece of code at all.
// increase sidebar length to match content (desktop mode only)
var $sidebar = jQuery('.desktop #dokuwiki__aside');
if($sidebar.length) {
var $content = jQuery('#dokuwiki__content div.page');
$content.css('min-height', $sidebar.height());
}
But if you still want to leave it, you should do it at least with a delay time.
Something like this:
// increase sidebar length to match content (desktop mode only)
setTimeout(function(){
var $sidebar = jQuery('.desktop #dokuwiki__aside');
if($sidebar.length) {
var $content = jQuery('#dokuwiki__content div.page');
$content.css('min-height', $sidebar.height());
}
},1);
But of course you decide what to do :)
Thanks!
DokuWiki is a very good software.
Bug show: http://wiki.babitch.com/bug/sidebar
Bug workaround: http://wiki.babitch.com/bug/workaround
Problem in file: $DokuWikiDIR/lib/tpl/dokuwiki# kuwiki/script.js
In this fragment:
It increase content's frame length, not sidebar.
And in this time several elements do not have actual height value.
As result content's frame height have incorrect value (too large).
Workaround: Do this after browser page rendering done.
The text was updated successfully, but these errors were encountered: