I don't recall that this used to hang, but now it does. The fix is similar to that for popup menus.
<rdar://problem/54728541>
Created attachment 377291 [details] Patch
Committed r249486: <https://trac.webkit.org/changeset/249486>