Resolves: fdo#83251 menu on master doc insert disappears

on releaseing mouse button

(cherry picked from commit a29ece90621b2fef9126a6e9a976561ce5d1b461)

Conflicts:
	sw/source/uibase/utlui/glbltree.cxx

Change-Id: Ia2f8da6e62d708744707b8187d5961fe12169eb8
Reviewed-on: https://gerrit.libreoffice.org/11362
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>