Title: JavaScript error in admin
Last modified: March 3, 2022

---

# JavaScript error in admin

 *  [Saul](https://wordpress.org/support/users/slightlyfaulty/)
 * (@slightlyfaulty)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/javascript-error-in-admin-4/)
 * Hi. Thanks for the great plugin! It works really well. I’m just here to report
   a JS error that’s being thrown in the admin backend. You can reproduce it as 
   follows:
 * 1) Go to your profile in wp-admin.
    2) Click on any text field, such as the First
   Name field. 3) Press Enter on your keyboard.
 * Normally this would submit the form and save any edits you’ve made. However, 
   I’m getting the error below in the browser console which is preventing the form
   from being submitted.
 *     ```
       Uncaught TypeError: Cannot read properties of null (reading 'closeModalById')
           at Object.close (micromodal.js?ver=2.1.0:1:6976)
           at HTMLButtonElement.<anonymous> (admin.js?ver=2.1.0:1:13838)
           at HTMLDocument.dispatch (jquery.min.js?ver=3.6.0:2:43064)
           at HTMLDocument.v.handle (jquery.min.js?ver=3.6.0:2:41048)
   
       File path: /wp-content/plugins/wp-2fa/dist/js/micromodal.js?ver=2.1.0
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-in-admin-4/#post-15555916)
 * Hello [@slightlyfaulty](https://wordpress.org/support/users/slightlyfaulty/)
 * Thank you very much for using our plugin and sorry for the late reply.
 * We’ve just released update 2.2.0 of the plugin, and 60%+ of the code has been
   refactored. Can you please please advise if you are still encountering this issue?
 * Looking forward to hearing from you.

Viewing 1 replies (of 1 total)

The topic ‘JavaScript error in admin’ is closed to new replies.

 * ![](https://ps.w.org/wp-2fa/assets/icon-256x256.png?rev=2961533)
 * [WP 2FA - Two-factor authentication for WordPress](https://wordpress.org/plugins/wp-2fa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-2fa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-2fa/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-2fa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-2fa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-2fa/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [robertabela](https://wordpress.org/support/users/robert681/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/javascript-error-in-admin-4/#post-15555916)
 * Status: not resolved