Commit 7640ade4 by Peter Fogg Committed by cahrens

Fix not being able to expand an empty subsection.

parent cbd066da
......@@ -33,9 +33,14 @@ $(document).ready(function() {
}
// Otherwise, do check the container
else {
// If the list is empty, we should prepend to it
// If the list is empty, we should prepend to it,
// unless both elements are at the same location --
// this prevents the user from being unable to expand
// a section
var containerY = container.offset().top;
if(siblings.length == 0 &&
Math.abs(eleY - container.offset().top) < 50) {
containerY != eleY &&
Math.abs(eleY - containerY) < 50) {
return {
ele: container,
attachMethod: 'prepend'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment