From d389d80062ff400c7f83654e00fcf8cd8ecb4738 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Mon, 25 Sep 2017 19:52:49 +0100 Subject: [PATCH] [toc2] constrain draggable toc to the body so that it doesn't end up out of view --- src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js b/src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js index 62c6cd454..207943e73 100644 --- a/src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js +++ b/src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js @@ -366,6 +366,8 @@ // Ensure position is fixed (again) $('#toc-wrapper').css('position', 'fixed'); }, + containment: 'body', + snap: 'body, #site', }); $('#toc-wrapper').resizable({