Move context menu if cropped

Fixes https://github.com/dart-lang/spark/issues/835
Honestly, I'm uncomfortable because the context moves after showing(but unable to catch by human eyes)

review @dinhviethoa