Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: undefined is not an object(evaluating swiper.freeMode.onTouchMove) #6751

Closed
5 of 6 tasks
hirbod opened this issue Jun 12, 2023 · 5 comments
Closed
5 of 6 tasks
Labels

Comments

@hirbod
Copy link

hirbod commented Jun 12, 2023

Check that this is really a bug

  • I confirm

Reproduction link

Nope

Bug description

9.4.0 introduced this bug. I am not using freeMode, just Swiper virtual
The issue happens when I want to use my finger to slide.

Downgrading back to 9.3.2 fixed the issue.

            <Swiper
              modules={[Virtual, Keyboard, Mousewheel]}
              height={windowHeight}
              width={windowWidth}
              keyboard
              initialSlide={clamp(initialScrollIndex, 0, data.length - 1)}
              virtual={{
                enabled: true,
                addSlidesBefore: 1,
                addSlidesAfter: 2,
                cache: false,
              }}
              direction="vertical"
              onRealIndexChange={onRealIndexChange}
              onReachEnd={fetchMore}
              threshold={isMobileWeb() ? 0 : 25}
              noSwiping
              noSwipingClass="swiper-no-swiping"
              mousewheel={{
                noMousewheelClass: "swiper-no-swiping",
                sensitivity: 1.1,
                thresholdTime: 800,
              }}
            >
              {data.map((item, index) => (
                <SwiperSlide key={item.nft_id} virtualIndex={index}>
                  <ItemKeyContext.Provider value={index}>
                    <FeedItem nft={item} itemHeight={windowHeight} />
                  </ItemKeyContext.Provider>
                </SwiperSlide>
              ))}
            </Swiper>

Expected Behavior

Being able to swipe up and down (single item, full height like tiktok)

Actual Behavior

TypeError: undefined is not an object(evaluating swiper.freeMode.onTouchMove)

Swiper version

9.4.0

Platform/Target and Browser Versions

iOS 16.4.1

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@hirbod hirbod added the React label Jun 12, 2023
@hirbod
Copy link
Author

hirbod commented Jun 12, 2023

Seems that commit is causing this:
abe1ec7

@ikangjie
Copy link

I also encountered this issue:
Uncaught TypeError: Cannot read properties of undefined (reading 'onTouchMove') at Swiper.onTouchMove

@ikangjie
Copy link

version: 9.4.0
9 4 0

@beyourahi
Copy link

I'm getting the same issue. Any fix?

@adrocodes
Copy link

Encountering the same error. Next v13.4.4, Swiper v9.4.0. Nothing special props wise, other than using the EffectCoverflow module.

Downgrading to v9.3.2 fixed the issue for me.
Unless you need something in v9.4.0 @beyourahi maybe downgrade for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants