aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiHyperText.cpp
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2021-01-23 14:48:57 -0800
committerGitHub <noreply@github.com>2021-01-23 14:48:57 -0800
commit6a55c03dabf7b5337233fc80078a300d485fcec4 (patch)
treea34bb863109ebacc0ed110a094747d79b14e5daa /src/gui/guiHyperText.cpp
parent6417f4d3143bc4c4c7f175aa8e40810cfacb5947 (diff)
downloadminetest-6a55c03dabf7b5337233fc80078a300d485fcec4.tar.gz
minetest-6a55c03dabf7b5337233fc80078a300d485fcec4.tar.bz2
minetest-6a55c03dabf7b5337233fc80078a300d485fcec4.zip
Make hypertext and textarea have proper scroll event propagation. (#10860)
Diffstat (limited to 'src/gui/guiHyperText.cpp')
-rw-r--r--src/gui/guiHyperText.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/guiHyperText.cpp b/src/gui/guiHyperText.cpp
index 88931cdf9..ccfdcb81d 100644
--- a/src/gui/guiHyperText.cpp
+++ b/src/gui/guiHyperText.cpp
@@ -1088,7 +1088,7 @@ bool GUIHyperText::OnEvent(const SEvent &event)
if (event.MouseInput.Event == EMIE_MOUSE_MOVED)
checkHover(event.MouseInput.X, event.MouseInput.Y);
- if (event.MouseInput.Event == EMIE_MOUSE_WHEEL) {
+ if (event.MouseInput.Event == EMIE_MOUSE_WHEEL && m_vscrollbar->isVisible()) {
m_vscrollbar->setPos(m_vscrollbar->getPos() -
event.MouseInput.Wheel * m_vscrollbar->getSmallStep());
m_text_scrollpos.Y = -m_vscrollbar->getPos();