Fix invisible cursor issue in edit popup (osx), closes #594 and closes #604