JavaScript DOM changes in touchmove delayed until scroll ends on mobile Safari
问题 In mobile safari, in the course of handling touchmove for an element, I change the className of that element. Unfortunately, the visual change does not occur while the user is scrolling, or until the very end of an inertial scroll. What can I do to get the className to visually take immediately? More: Apparently this isn't limited to className changes, but seemingly any change to the DOM, such as innerHTML and style . 回答1: This is by design unfortunately. iOS safari will queue up all DOM