Fixed context menu overflow

fixed #2788

review: @ussuri