onMouseEnter does not fire on an underlaying element if an element above is removed
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 251k
- Fork
- 51.4k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 53
Mô tả
Do you want to request a feature or report a bug?
Bug - I did do some searching around the issues to see if there was a similar/dupe, but I could not find one.
What is the current behavior?
With 2 elements overlaying on top of each other, if the upper element gets removed while the cursor is over both elements, mouse enter never fires on the element below. I compared this to native browser events and the issue does not appear to persist there (native browser events appear to fire mouse enter for the underlying div when the overlaying div gets removed).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
I provided a top level boolean constant to switch between using react's synthetic events and the native browser events. In the console I keep track of state updates as console logs. The simple way to test - open the console, mouse over the upper div in a position that is also on top of the lower div, click to remove the upper div, the lower div SHOULD fire mouse enter. It does not with synthetic events, but it does with browser events.
What is the expected behavior?
Expected behavior for me would be if react would fire mouse enter on the underlaying div when the upper div is removed.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
"dependencies": {
"react": "16.5.2",
"react-dom": "16.5.2",
},
I have not had a chance to test previous versions.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với CodeSandbox được liên kết và so sánh các sự kiện chuột tổng hợp của React với các sự kiện trình duyệt gốc được mô tả ở đó. Theo dõi quá trình xử lý sự kiện tổng hợp để xóa phần tử bên trên, sau đó xác minh rằng div bên dưới nhận được mouseenter sau khi xóa và bổ sung coverage cho hành vi đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100