Prior art continues to be a basis for invalidating a patent: the prior disclosure of an invention to the public invalidates a later patent. All first to file does is change the rule for deciding who gets priority in the unusual case where there are simultaneous patent applications before the PTO. Before, there was an inquiry into who was the first to reduce the invention to practice. Now, priority goes to the first to file. But a patent still cannot be issued if the invention was previously disclosed to the public either by the inventor (outside the one-year grace period), or by someone else.
"Under the U.S. first to file system the inventor will still have a personal grace-period, which is not available to inventors outside the U.S. in many countries that follow a more traditional formulation of the first to file rule. This personal grace-period says that the inventor’s own disclosures, or the disclosures of others who have derived from the inventor, are not used as prior art as long as they occurred within 12 months of the filing date of a patent application relating to the invention. However, and this is a very big however, disclosures of third-parties who independently arrived at the invention information will be used against the inventor unless the disclosure is of the same subject matter. Said another way, there is virtually no chance that a grace-period will exist relative to third party, independently created disclosures."
Prior art indeed does invalidate the ability to patent something, unless the prior art was yours, and you patented said art within 12 months of its disclosure.