From 3b91d0492e6dcd9b28791875dc93691bed8e775e Mon Sep 17 00:00:00 2001 From: elasota Date: Mon, 2 Nov 2020 22:22:31 -0500 Subject: [PATCH] Fix downward scroll when deleting a character in a multi-line edit box when all of the lines fit inside of the edit box --- PortabilityLayer/PLEditboxWidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PortabilityLayer/PLEditboxWidget.cpp b/PortabilityLayer/PLEditboxWidget.cpp index fbd30e0..28f73d0 100644 --- a/PortabilityLayer/PLEditboxWidget.cpp +++ b/PortabilityLayer/PLEditboxWidget.cpp @@ -975,6 +975,9 @@ namespace PortabilityLayer int32_t h = m_rect.Height(); if (lowerY < h) m_scrollOffset.m_y -= lowerY - h; + + if (m_scrollOffset.m_y > 0) + m_scrollOffset.m_y = 0; } }