According to the provisions of relevant laws in China, the custody of children belongs to the principle of facilitating the growth of children. If the basic conditions of parents are the same, and the grandmother is able to take care of the children, it can be awarded to the grandmother.
Some Specific Opinions on the People's Court's Handling of Children's Support in the Trial of Divorce Cases
4. The conditions for parents to raise their children are basically the same. Both parties require their children to live together with them. However, if the children have lived alone with their grandparents for many years, and the grandparents require and are able to help their children take care of their grandchildren, they can be considered as the priority conditions for children to live with their parents.
5. In case of a dispute between parents over the age of ten over a minor child living with his or her father or mother, the views of the child shall be taken into consideration.