fix for modals not working on FF due to https://bugzilla.mozilla.org/show_bug.cgi?id=718000