It's complicated and depends what the bonus is for, and the terms and conditions of the bonus scheme. it doesn't sound performance related if everyone got the same.
I'm going to copy and paste from the working families website which has a good section on this.
-------
This is a complicated area as there are different types of bonuses and there have been many tribunal cases on this issue. You should check the type of bonus (contractual or discretionary), what it has been paid for and the period to which it relates. If you have been refused all or part of a bonus discuss it with your employer and if you cannot agree seek further advice. At present the law states that you are entitled to the following:
Bonus or commission payments which are not part of your normal salary should be paid in full during OML. For example, a Christmas bonus is not usually your normal pay and should almost certainly be paid during OML. Also, if a bonus such as a Christmas bonus has been paid to the whole workforce, it may be sex discrimination to refuse to pay it to a woman on maternity leave.
Commission that is part of your salary or performance-related pay is likely to be classed as remuneration so it is not payable during OML. However, it would be sex discrimination to refuse to pay the proportion of any bonus or commission that relates to the time that you were actually at work (this was decided in the case of Lewen v Denda). For example, if you were at work for half the year and on maternity leave for the other half of the year, you should be paid half of the bonus. You are also entitled to the proportion of any bonus that relates to the time you were on compulsory maternity leave (two weeks immediately following the birth of the baby or four weeks for factory workers). This was decided in the case of Hoyland v Asda.
If a bonus, such as a loyalty bonus, has been paid to employees ?in work? on a certain date (when you were on maternity leave) then it could be sex discrimination to refuse to pay you because of your absence on maternity leave (this was decided in the case of Gus Home Shopping v Green and McLaughlin).
You are not entitled to contractual rights during AML. However, as with OML, it may be sex discrimination to refuse to pay all or part of a bonus because you are on AML. You are definitely entitled to at least the proportion of any bonus or commission that relates to the time you were in work and for the period of compulsory maternity leave.
--------
Hope that helps.