Why is Taiwan in dispute?

The politicians want Taiwan to be separate from China and they tried to gain UN membership as Taiwan as opposed to Republic of China (they failed). During the Chinese civil war most Nationalists escaped to Taiwan and developed its economy but both governments claimed to be in control of both China and Taiwan. Eventually the Nationalists gave up the idea. There is constant conflict between Taiwan and China as Taiwan wants to declare independence. Taiwan buys weapons from US in order to protect themselves from a possible invasion.