Revert "FIxed Chrome and Firefox bug with pattern"

This reverts commit 805824df7e3056c82519f94fdafe1e631ef301e1.
Revert "Revert "FIxed Chrome and Firefox bug with pattern""

This reverts commit 36bb2de9924746bb27ce67a4d43901ccab7a229e.