GeoGebra auf Webseite einbinden: Webseite "springt" bei Fokussierung

Thomas Wassong shared this question 5 months ago
Needs Answer

Hallo,

wir haben GeoGebra über deployggb.js in unseren HTML-Webseiten integriert, die viel Content haben. Das heißt, man muss scrollen.

Wenn man nun zu einem GeoGebra-Applet auf diesen Seiten hinscrollt und den Fokus darauf setzt, z.B. in dem man auf einen Schieberegler klickt, dann "springt" (d.h. "scrollt automatisch") die Webseite.

Gibt es eine Möglichkeit, das automatisch scrollen zu unterbinden? Uns ist klar, dass es dazu dient, dass das gesamte Applet im Viewport liegt. Wir würden es dennoch unterbinden wollen, unter anderem da es in Zusammenarbeit mit dem Foundation-Framework zu Problemen führt.

LG Thomas

Comments (6)

photo
1

Have you tried the preventFocus parameter?


https://wiki.geogebra.org/e...

photo
1

Yep, we just tried it. Thank you for the hint. But unfortunatley it doesn't work ...

GeoGebra is still jumping ...

Tomorroy, I'll try to make an example to better understand, what's going on.

photo
1

so, I'm back. Attached you'll find a small example with two ggb-Applets. Clicking on a slider forces the website to scroll until the whole complete ist in the viewport. This scrolling we want to pervent.

Do you see any solution? preventFocus doesn't work

photo
1

Why do you want to prevent scrolling?

photo
1

Because the scrolling behauvior is not expected by the users. If I click on a website, i do not expect that the website is scrolling or jumping. No website or webcontent is doing this, except the geogebra applets.

photo
1

Hi,


I looked at the example from Thomas. In that case the jumping of the scroll position seems to be inconvenient.


I have another example as pictured in the attached screenshots. By clicking on the slider in the applet roughly a second later a scroll event is initiated that scrolls the whole page upwards. In this case the clicked applet is scrolled out of the viewport! This makes the ggb applet unusable in our case because the page jump-scrolls again everytime I click on the applet.


The phenomenon also occurs when I click on the slider and keep the mouse button pressed and it is not related to a specific applet.

© 2019 International GeoGebra Institute