Fix a possible overflow in select
Start on cross-platform context menus