Fix #11361 (Cannot open menu for vector layer in TOC when its table of attributes is open)

Dual view's attribute form was triggering canvas refresh which in turn
caused the popup menu to be closed again. (at least in KDE)