I would do something less algorithmic, here. Store a reference to the last known "solid" tile the player object was standing on. melonJS collision detection currently only checks the tile types at the corners of the object, so you would just do the same: After you call
this.updateMovement(), check the tile directly one pixel below the lower left corner. If that fails to be solid, check the tile one pixel below the lower right corner. Store the reference for the first solid tile found, or do not update if the tile is not solid (eg, the player is jumping or has fallen off a ledge).
When you're ready to reset the position, you already know which tile the player was last standing on... The SNES and GB Zelda series does this when Link jumps into water without the flipper item.