A man has appeared after allegedly spitting at his ex-partner and chasing her.
Roy Iredale was handed a restraining order banning him from going to the flat in Dalton, Kirklees magistrates heard.
But on Sunday he allegedly ignored this and attended at the address on Longfield Avenue.
Andy Wills, prosecuting, said he repeatedly pressed on the buzzer before entering the flat and pulling his former partner by her hair.
The 29-year-old is then alleged to have dragged her to the floor and slapped her around the head.
When she broke free he is alleged to have chased her before spitting in her face and smashing her phone.
Iredale, of North Street, Mirfield, denies charges of breaching his restraining order, criminal damage and assault.
His trial will take place at the Huddersfield court and he was remanded in custody.