Temporomandibular joint surgery is done when there is severe clicking or inability to chew properly. This operation is kind of done with a prosthesis, an artificial hinge in a sense, and it is fraught with complications, and I would strongly advise anybody not to do the procedure unless they are truly desperate.
