Remove race condition waiting for proper event instead of fixed time

Sometimes after I cancel an edit the pin list does not scroll anymore, or some other times the gray backdrops doesn't get deleted. After this change I didn't have the problem anymore.