Skip to content

Commit 9f2686a

Browse files
committed
#500 fixed page manager pop-up menu jumping around
1 parent 69420c9 commit 9f2686a

File tree

2 files changed

+16
-28
lines changed

2 files changed

+16
-28
lines changed

src/cloudscribe.SimpleContent.Web/js/pagetree.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Author: Joe Audette
22
// Version: 2018-02-12
3+
var tetherInstance;
34
$(function () {
45

56
String.format = function () {
@@ -10,7 +11,7 @@ $(function () {
1011
}
1112
return s;
1213
};
13-
14+
1415
var pageTree = {
1516
ui: {
1617
treeDiv: $('#tree1'),
@@ -49,14 +50,19 @@ $(function () {
4950
pageTree.ui.newChildLink.attr('href', this.urls.newPageUrl + "?parentslug=" + node.slug);
5051
pageTree.ui.pubStatusLabel.html(node.pubstatus);
5152
pageTree.ui.cmdBarDiv.show();
52-
new Tether({
53+
tetherInstance = new Tether({
5354
element: '.commandPanel',
5455
target: '.jqtree-selected',
5556
attachment: 'top left',
5657
targetAttachment: 'top right'
5758
});
5859
setTimeout(function () {
59-
tether.position();
60+
if (tetherInstance) {
61+
tetherInstance.position();
62+
}
63+
});
64+
setTimeout(function () {
65+
tetherInstance.position();
6066
})
6167
if (node.childcount > 1) {
6268
pageTree.ui.sortLi.show();
@@ -275,3 +281,9 @@ $(function () {
275281
};
276282
pageTree.init();
277283
});
284+
285+
$(window).on('scroll', function () {
286+
if (tetherInstance) {
287+
tetherInstance.position();
288+
}
289+
});

src/cloudscribe.SimpleContent.Web/js/pagetree.min.js

Lines changed: 1 addition & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)