Fix grid's modal editor when there's no scope.

Close #299