diff --git a/src/static/js/tutorial.js b/src/static/js/tutorial.js index ff0724c..3882534 100644 --- a/src/static/js/tutorial.js +++ b/src/static/js/tutorial.js @@ -1406,9 +1406,7 @@ const Tutorial = { setTimeout(function() { if (self2._isActive && self2._currentStep === i) { self2._positionBubble(step); - // Jetzt erst sichtbar machen - self2._els.bubble.classList.add('visible'); - // Clamp + Arrow nochmal ausfuehren + // Clamp + Arrow ausfuehren, DANN sichtbar machen requestAnimationFrame(function() { var bubble = self2._els.bubble; var bRect = bubble.getBoundingClientRect(); @@ -1432,6 +1430,8 @@ const Tutorial = { bubble.style.setProperty('--arrow-top', ay + 'px'); } } + // Erst jetzt sichtbar machen - Position ist korrekt + bubble.classList.add('visible'); }); } }, 450); @@ -1540,11 +1540,8 @@ const Tutorial = { bubble.classList.remove('tutorial-bubble-pulsing'); } - // Sichtbar machen (bei Modal-Steps erst nach Reposition) + // Bubble erst nach Clamp-Check sichtbar machen (verhindert Springen) var isModalBubbleStep = step.bubbleTarget && step.target && step.target.indexOf('#modal-') !== -1; - if (!isModalBubbleStep) { - bubble.classList.add('visible'); - } // Sicherheitscheck: Bubble komplett im sichtbaren Bereich halten var self = this; @@ -1581,6 +1578,10 @@ const Tutorial = { bubble.style.setProperty('--arrow-top', arrowY + 'px'); } } + // Jetzt sichtbar machen (nach Clamp + Arrow) - nur fuer nicht-Modal Steps + if (!isModalBubbleStep) { + bubble.classList.add('visible'); + } }); },