-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(PullToRefresh): rm global touchmove listener
- Глобальный обработчик touchmove влиял на поведение элементов с горизонтальным скроллом (например, HorizontalScroll) – нужно ровно по оси X проводить пальцем, чтобы заработало. После удаления проблему, из-за которой был добавлен этот обработчик, не смог воспроизвести. Даже если такая проблема есть, то думаю она не критичней, в отличии от блокировки горизонтального скролла. Удалил тест, который проверял глобальный обработчик. - Заодно поправил проблему, когда при работе спиннера можно было бы потянуть сверху вниз и вызвать нативный pull-to-refresh – для исправления, мы сохраняем св-во `overscroll-behavior` на `document.body` пока не закончится обновление. Вынес логику в эффект. - Избавился от `useTimeout`, т.к. он скорее усложняет код, чем облегчает его. - Добавил больше данные в примере Storybook, чтобы увеличить высоту контента под скролл.
- Loading branch information
Showing
3 changed files
with
63 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters