I've ran into this problem for years. I download a bunch of pics in Firefox, and then have to manually clear the download list. When I do, Firefox is brought to the foreground.
This should not be the case, and I think it's a bug.
I can't find anything about this, possibly because the search terms are too common.
Are there fixes or mitigations for this behavior?
Currently running rooted on android 5.1 on Note 2, but this problem has occured on different devices and different versions of Android. I think 4.x and later. That's coincidental though, because Firefox only really got official about that same time.