FIX: ensures widget dropdown doesnt overflow document (PR #9590)

GitHub