Yea, the inverse image should be connected. But, according to the property of reserving closeness, I am thinking why not define the continuous function as this way:
It maps connected subsets in X onto connected subsets in Y; For any connected subset in Y, its inverse image in X is connected.