Resolved X browser JS issue in modal and nav processing (toElelement -> target)