It was another sunny day. Happy to fly the code. But that’s life, you never know which will come first, off work or bugs.
This is not, just humming a tune, there test told to throw over a bug, the test found that scrolling loading is invalid, at that time I….
Cough cough, wrong, like me so handsome, beautiful, talented, knowledgeable people can not write bugs.
Follow the procedure provided by the test on the spot… No problem ah, instantly confused, began to check, check whether the test and I in the same environment, the same version, etc., a check down, found no problem…
Call the test, let him show me on the spot, found that the problem is indeed there.
At that time, I felt confused. Can I go back this night? .
This component library is a component library that has been used for a long time, and is essentially a single line of code calling an infinite scroll instruction… There is no error, and the head is large. At this time, the test indicates that there may be a corresponding situation when scaling
When it comes to zooming, what comes to mind? DevicePixelRatio, the screen pixel ratio, and found that only when devicePixelRatio is certain fixed value will the problem occur, instantly get the problem point, Typical devicePixelRatio and floating point accuracy loss, so when triggered, just add an interval, do it, and test feedback is resolved.
But I can’t just walk away from this.
Yes, since the library you use is a direct descendant of Elemental-UI, go to Elemental-UI and make things happen
Haha, I found that there is a corresponding problem with the example of element-UI infinite scrolling, that is, the corresponding problem will occur when the browser devicePixelRatio is 1.75, the scrolling load cannot be triggered, and the hand flipping is an issue. It would be a good start to join an open source project if you changed the default trigger values or considered floating point numbers at the end of the calculation, but think about the bugs and save them for the weekend
The simplest way to do this is to set the trigger value to a small value, so you can ignore the float problem. If you are interested, you can also use Element to fix the problem Haha, you might be able to contribute to the open source community