It's possible for the hero to trigger other touch/collision events while it's being moved by a list of event commands. In fact, the hero can trigger multiple events, but they won't start until the list has been completed. If more than one events have been triggered, they'll run in ascending order of IDs. This means it doesn't matter in which order these events are triggered by the hero. It looks like in this context, the touch/collision triggers are checked right after the hero's move route has been finished.
That might have been a bit confusing, so here's an example.
Fix pan (position and behaviour after teleport)
Added the test case example to emscripten for online testing:
Latest PR: https://easy-rpg.org/play/index-pr.html?game=issue_331
What do you think about some convention like test_name_of_test or issue_#number.
Looks good the issue_# way for easier access if exist. Updated links for now.