From 3378ee17da7602b5f845a90ffab93eddced82f0f Mon Sep 17 00:00:00 2001 From: Tiago Dinis Date: Tue, 19 Aug 2025 19:26:04 +0100 Subject: [PATCH] fix: scroll reset bug --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index dfa2952..71b7fe9 100644 --- a/clay.h +++ b/clay.h @@ -4109,7 +4109,6 @@ void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDe Clay__ScrollContainerDataInternalArray_RemoveSwapback(&context->scrollContainerDatas, i); continue; } - scrollData->openThisFrame = false; Clay_LayoutElementHashMapItem *hashMapItem = Clay__GetHashMapItem(scrollData->elementId); // Element isn't rendered this frame but scroll offset has been retained if (!hashMapItem) { @@ -4117,6 +4116,7 @@ void Clay_UpdateScrollContainers(bool enableDragScrolling, Clay_Vector2 scrollDe continue; } + scrollData->openThisFrame = false; // Touch / click is released if (!isPointerActive && scrollData->pointerScrollActive) { float xDiff = scrollData->scrollPosition.x - scrollData->scrollOrigin.x;