Skip to content

Resolve "Admin Settings: Cannot read property 'addEventListener' of null"

What does this MR do?

This MR makes sure that initUserInternalRegexPlaceholder is loaded only when needed (i.e., on the admin settings General page) instead of loading it on all admin subpages.

By this, it fixes the issue of attaching an event handler to a non-existent DOM element but also avoids loading of unnecessary JS code on certain admin pages.

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/56622

Does this MR meet the acceptance criteria?

Closes #56622 (closed)

Edited by Martin Wortschack

Merge request reports