FIR filter window method [duplicate]

In the window method for filter design it is explained that we do an ideal filter and then we pass it to time domain, but it will be time limited and then...

Why don't we filter directly in the frequency domain?

• I think it will be useful to read for you - Why is it a bad idea to filter by zeroing out FFT bins? – SergV Apr 10 '19 at 3:55
• – Olli Niemitalo Apr 10 '19 at 3:56
• @OlliNiemitalo: Most of the answers to that question (including the accepted one) actually refer more to windowing for spectral analysis instead of addressing the question of filtering data. – Matt L. Apr 10 '19 at 7:00
• The problem is that doing the IFFT after zeroing some bins doesn't always produce a "nice" signal in the time domain. I belive that this is related with the inter-bin frequencies. – Filipe Pinto Apr 10 '19 at 7:28
• @MattL. yes it seems $@$SergV's link is a better match. – Olli Niemitalo Apr 10 '19 at 7:56