In this figure from Wikipedia, we know that electron's wavefunction collapse at screen F, causing an interference pattern. Does it mean that in this case when the wavefront arrives at the screen, the screen does something similar as a 'measurement' to cause the wavefunction to collapse? If so, why wouldn't the electron's wavefunction collapse at screen S2 which will produce no interference pattern at the screen F, since the wavefront first arrives at the screen between slits B and C?
This is an insightful question. Actually, the comment by @my2cts is right on the mark.
"Wave function collapse" really doesn't happen. Instead, the microscopic quantum state (location of photon's impact on the screen, which is quantum mechanically indeterminate) gets correlated to a macroscopic state (your perception of the location of the photon's impact on the screen). Your perception state, too, is quantum mechanically indeterminate. What you see is one randomly selected location out of the entire range of possible locations (with the randomness weighted according to the squared amplitude of the wavefunction at each location). If the wavefunction of the whole system is expanded to include you, there will be an infinite number of yous, each seeing the photon apparently hitting a different location on the screen.
As you can see from the comments, wavefunction collapse is just one of the interpretations (Coppenhagen) in QM, actually a very interesting one.
Now to your question, why does the electron's wavefunction not collapse at the first screen?
The answer is the two little slits. As the wave reaches the first screen, you say that the wavefront reaches the screen first between the slits. This implies that you think of the wave as propagating in the displayed fashion.
In reality, the electron as it propagates, a QM object, its trajectory is undefined. It takes all possible paths. Yes QM is a tricky beast and it is very unintuitive to imagine.
What really happens is that the electron as it propagates, reaches the first screen and continues to propagate through the slits, that is why there is no decoherence with the environment, that would cause the electron's superposition to reduce to an eigenstate, with a certain eigenvalue (the position of the electron on the screen).
The photons do not have a well defined trajectory. The diagram shows them as if they were little balls travelling along a well defined path, however the photons are delocalised and don't have a specific position or direction of motion. The photon is basically a fuzzy sphere expanding away from the source and overlapping both slits. That's why it goes through both slits. The photon position is only well defined when we interact with it and collapse its wave function. This interaction would normally be with the detector.
What confuses you is that you try to imagine the wave as reaching the part of the screen between the slits first, then decohere, and cause the collapse of the wavefunction. What really happens is that the electron takes all paths and finds a way through the slits. Yes it is very hard to understand how the wave takes all the paths, and knows not to collapse because there are two slits to go through. This is QM.
The most intuitive way of looking at interference that I have encountered is Feynmann's Path Integral Formulation. Loosely speaking, if you have a photon (or anything, really) in location A and want to work out its chance of moving to B, you imagine it taking every possible path between the two at the same time.
When the electron reaches the second screen, it does not find any slits to propagate through, and finally interacts with the screen, leaving a dot on the screen. That is what you call the collapse of the wavefunction. Its position becomes localized.