#8900: Using keyboard shortcuts in IDLE to open a file no longer raises an exception.
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index b81c5ed..b032a65 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -171,8 +171,9 @@
                     break
             ishandlerrunning[:] = []
             # Call all functions in doafterhandler and remove them from list
-            while doafterhandler:
-                doafterhandler.pop()()
+            for f in doafterhandler:
+                f()
+            doafterhandler[:] = []
             if r:
                 return r
         return handler