I have been developing a webapp with vtk.js. By accident, I noticed that, whenever I hit w key, the object changes to wireframe. Why does this happen and how to avoid this?
You just need to use a different interactor style. The default one allow you to change the representation by using [v]ertex, [w]ireframe, [s]urface.
You can use the manipulator one to configure your setup the way you want.