I encountered a strange bug in the project. After switching to page X and returning to the home page, the scroll bar on the home page disappeared, but the height was beyond the page. This problem was not found during development, but will occur after project deployment.

Because the home page is a combination of some charts, I started to think that the height of the icon is not enough. After trying to write the height, the problem still exists.

This afternoon, I spent an hour looking for this problem and found that every time I switched to the X page, the body style was always written to [OveFlow: Hidden], and this only happens in production environments.

The problem repeats every time you click on the card area on page X. Ok, so turn on the breakpoint method, listen for the body element, and sure enough, you find the problem

Follow the breakpoint clue to a clickHandler function in elementUi, and keep looking

The el-image component will be called every time the el-image component is clicked. This function will change the body attribute. Elemenui is a HACK that is designed to be loaded in a way that is easy to find.

Now that you know what the problem is, it’s easy to fix it by overriding the body property again.