Hazrat Umar Farooq RadiAllahu Anhu was the one to stop women from attending the Masjid and Hazrat Aisha Radiyallahu Anha and Abdullah Ibn Masood RadiAllahu Anhu also agreed with him as have countless Ulama of Ahlus Sunnah wal Jamah.
Well that wasn't the point, praying Janaza Salah in the Masjid is Makrooh Tahrimi, the point is that if praying Salah that is Fard in Masjid is Makrooh Tahrimi for women then what would be the ruling on a Salah elsewhere that is not Fard.
SHAFI allows JANAZAH Salaah inside the Masjid. HANAFI does not allow JANAZAH Salaah inside the masjid. I am told Mufti Ahmed Yaar Khan Naeemi Hanafi AlayhiRahma has advised ( either in his SHARAH of Hadith or TAFSIR) for woman nowadays should be allowed to attend masjid considering that previous times they could use this as an excuse to leave the house whilst nowadays they do not need to use this as an excuse since they leave the house for so many other reasons nowadays. Most ulema especially of previous times never entertained the idea. I am told that a woman reading salaatul janazah is sinful since this is not required from them but the Salaah would be valid.