A man beat up his ex-girlfriend and tried to strangle her with a telephone wire as she tried to call 999 for help.
Adam Robinson had a restraining order against him when he subjected his former partner to a sustained attack.
Leeds Crown Court heard Robinson locked her in the house then stamped on her ribs, dragged her around the house by the hair and put his fingers up her nostrils as he tried to lift her up.
Nicoletta Alistari, prosecuting, said the couple had been together for three years but had recently split up when he accused her of sleeping with another man.
The woman had moved in with her mum and, on February 16 this year, Robinson went to the house on Bawn Drive in Farnley.
He went upstairs to her bedroom and her mum, who was in her own bedroom with the couple's one-year-old daughter, could overhear them arguing.
The grandmother, who was described as 'frail' and recovering from a serious illness, wanted to call the police, but she could not as her phone was in another room.
The attack went on for an hour and eventually the elderly woman, wearing a nightgown and no shoes, climbed out of a downstairs window and fled to a neighbour's house where she called the police.
When the police arrived, the doors were still locked and the victim had to pass her baby out of a window..
Robinson threatened to jump from a first floor window, leading to a three-hour stand-off with police before his arrest.
Robinson, 33, of Ashton Crescent, Bramley, pleaded guilty to assault occasioning actual bodily harm and false imprisonment.
He has 12 previous convictions for 16 offences, including assault and threatening behaviour.
Thomas Stanway, mitigating, said had been drinking and taking cocaine for two days before the incident.
He added that his client struggled to cope with relationships.
Robinson was jailed for 27 months
Recorder Joanne Kidd said: "All three females in that house - grandmother, mother and child - were at your mercy."