akiran / akiran/react-slick

Media Query not firing when narrowing down if document width equals to the largest breakpoint

Đang mở
#1,478 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
11.9k
Fork
2.1k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Media Query not firing when narrowing down if document width equals to the largest breakpoint.

Sandbox: https://codesandbox.io/s/oqvyx99o4z

**Solution:**
I've checked previous commits and saw a [commit](https://github.com/akiran/react-slick/commit/e1611c2f6f9ad0256d160c01e89493648f8537f4#diff-e8eaa42a1b8ab4981d9272be425c03df) related to this issue.
Same change must be applied to the full screen media query by incrementing minWidth value by 1.

![slick 2019-01-05 23_48_51](https://user-images.githubusercontent.com/992897/50729071-877bda00-1144-11e9-825d-ff468064efb5.gif)

If current width is equal to largest breakpoint, narrowing down the page up to closest breakpoint does not update slide numbers.

**Expected Behavior**
After narrowing down up to closest breakpoint, there must be 3 slides

**Current Behavior**
It shows 4 in this example:

**Steps to Reproduce**
- Go to this sandbox: https://codesandbox.io/s/oqvyx99o4z
- Resize the window to 1024px, which is the value of largest breakpoint.
- Narrow down the window to a value bigger than the closest breakpoint value. (This is example, it is 600px)

**Context**
- react-slick: 0.23.2,
- react-dom: 16.5.2,
- react: 16.5.2
- Google Chrome: 71.0
- MAC OS X: 10.13.6

P.S. Issue reported to me by @hamzaerbay

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.