Same story, on the picture the person broke it… You can see the naked soldering pads… This is wrong! Anf if you think glue or tape should fix it, you should not be attempting this!
I see people talking about gluing it back. This is a connector that carries electricity, the electricity is what make the fan turn, not magic. The connector needs to be soldered back, not glued., as glue doesn’t conduct electricity. Any attempt at gluing it back will make further reparations very complicated, as the reparator will have to try to remove the glue you put in order to be able to solder back.
Long story short, if you think gluing it back is a good idea, you should not be attempting this repair (changing the keyboard) in the first place.
Haha on the picture the person broke it! You should take it off same way you take off the fan connector. This illustrates what happens when you do it wrong.