Fix editor close and editing fail bug. Widget delegate now stores the index to the editor.