Skip to content

Commit

Permalink
Fix ElementHandle resizing incorrectly when the size_target has "box-…
Browse files Browse the repository at this point in the history
…sizing: border-box".
  • Loading branch information
nimble0 committed Jul 29, 2021
1 parent 85bbd93 commit 486d47b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Core/ElementHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ void ElementHandle::ProcessDefaultAction(Event& event)
move_original_position.y = move_target->GetOffsetTop();
}
if (size_target)
size_original_size = size_target->GetBox().GetSize(Box::CONTENT);
size_original_size = size_target->GetBox().GetSize(
(size_target->GetComputedValues().box_sizing == Style::BoxSizing::BorderBox)
? Box::BORDER
: Box::CONTENT);
}
else if (event == EventId::Drag)
{
Expand Down

0 comments on commit 486d47b

Please sign in to comment.