If the "View history" tab changes size such that becomes too large where it before was not, an endless animation loop of collapse-expand-collapse-etc can be triggered. A resize could be caused by an ordinary zoom (frequently resizing the pixel width of the element by a few pixels), by a change in browser text size preferences (likely to significantly change the width), or by a user script modifying the text content of the element.
This appears to be caused by expandCondition in Vector.js using a cached version of the element's width (collapsibleTabs.data's expandedWidth passed as the eleWidth argument), while collapseCondition is checking .width() each time.
This happens when you enable Editing mode: show both tabs is enabled in preferences in VisualEditor and visit https://www.mediawiki.org/wiki/User:Martin_Urbanec?uselang=fr at certain screen resolutions. Demonstrated in image below: