Generally speaking such completion (as shown on your second screenshot) should not be working in JavaScript file, unless it's a:
Considering the last one: try disabling Emmet for JSX at Settings/Preferences | Editor | Emmet | JSX
Settings/Preferences | Editor | Emmet | JSX
Settings/Preferences | Editor | Emmet | JSX
.
Open Settings->Editor->General->Smart Keys and uncheck "Automatically insert closing tag".
If you're still experiencing this problem, it might because of the following issue: https://youtrack.jetbrains.com/issue/IDEA-119253 (it should be fixed in 138.2128, 138.2206 but there are several similar open bugs).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.