hide dialog underlay and focus editor before inserting table, fixes #17206
(cherry picked from commit dda42b36d60ad40ae6193c8c5c00c90ab1081a9c)