Ensure tourGuide popover doesn't fall offscreen

Only handles the left hand edge - will need expanding to cover
the other edges as needed
This commit is contained in:
Nick O'Leary 2021-10-22 09:24:40 +01:00
parent 6a49b5c106
commit 2bd5c4f527
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 6 additions and 1 deletions

View File

@ -348,7 +348,12 @@ RED.tourGuide = (function() {
maxWidth: maxWidth+"px",
direction: direction,
})
setTimeout(function() {
var pos = popover.element.position()
if (pos.left < 0) {
popover.element.css({left: 0});
}
},100);
if (nextButton) {
setTimeout(function() {
nextButton.focus();