Fix error on page custom layout options change in Firefox (Bug #1396837)

Change-Id: Ie6c593d72dd869db59b7aba26c428ea74f14cb7b
Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>