-
Notifications
You must be signed in to change notification settings - Fork 552
Scroll and mousewheel don't work in chrome #20
Comments
Hey @onemanstartup, can you please give us a little more info around this issue. Is this happening on the sites examples? or just locally? is this installed via npm or the dist bundle? Agree we should add some more info around browser support/environment requirements, feel free to create another issue for this. |
Just locally, basically this is what I have this code. I'm using webpack. Object.assign = Object.assign || require('object.assign')
FixedDataTable = require('fixed-data-table')
require('fixed-data-table/dist/fixed-data-table.css')
Table = FixedDataTable.Table
Column = FixedDataTable.Column
rows = [[1,2], [2,2], [2,2], [2,2], [2,2]]
rowGetter = (rowIndex) ->
rows[rowIndex]
module.exports = React.createClass
render: ->
<div>
<Table rowHeight={40} rowGetter={rowGetter} rowsCount={rows.length} width={200} height={610} headerHeight={40} >
<Column cellRenderer={@cellRender} label="lol" width={200} dataKey={0} />
</Table>
</div> it seems webpack can't require some files.
|
Didn't encounter this issue, until I started using webpack. Happens randomly, for no obvious reason. |
Hey @onemanstartup @jusio i'm having some trouble reproducing this issue. I created this minimal test case repo based off your example code above (https://github.com/pieterv/fixed-data-table-test), this runs fine for me locally. Could you try checking this out to see if it works for you and maybe tweak it till you can reproduce your error. Thanks for your help, this seems like a strange error, it would be good to get to the bottom of it :P |
@pieterv Here is how to reproduce, insert in webpack.config.js this |
@onemanstartup hmm adding |
I tried chrome 39 So I downloaded chrome canary 42, clear cache and it's working. I still don't know what besides eval can trigger that behaviour. I will report if any changes in browser break this. |
Well, it's looks like this bug is extremely random. Sometimes it appears right away after page load. Sometimes it appears after 5 minutes after load. But happens less often on your example (with devtools:"eval"), than on my project. Just to help I've put my code on this branch: https://github.com/jusio/storage-area-explorer/tree/wheel-bug To build, use: Here is a demonstration of bug in action: https://www.youtube.com/watch?v=eupBPysVaDg |
Hey @jusio, thanks for the awesomely detailed bug report, thanks to this after a lot of digging i think i have found the issue! So first to reliability reproduce the bug i found that if you close the dev tools, then refresh the page it would show up as soon as you scrolled the mouse wheel. I believe the issue is related to how webpack is packaging the files then There is two ways to fix this issue, one hacky quick way is for us to remove "use strict" from our files, which i would really rather not do. Or the other way is for webpack to wrap the eval string of the modules in a self executing function which it does for most modules that use custom globals like |
By the way @jusio that looks like an awesome chrome plugin, it's awesome to see this project being used outside of Facebook! |
@pieterv thanks a lot, I was toying with idea to move to React from Angular for some time already, but it was fixed-data-table, which helped to make this decision. Many more people will be using it, for many applications a scrollable, fast grid with fixed rows/headers is a must have component. It is very generous of you to open-source this component=) Regarding the bug, I think Webpack should be notified for sure, at least they will be able to make a more specific bug report for chrome team (it is mainly a chrome issue, from what I understand). |
@jusio Awesome to hear! It's comments like that that make it worth it for us! Good idea i will create an issue with webpack. |
After some poking around on github issues it seems this is a known issue and can be fixed by adding a Related issues: |
…classes With our ES6 class transform if `"use strict";` is not defined at the top of the file it will insert it within each method, this causes a weird bug in Chrome when the file is `eval`ed which is common with webpack for source maps support. I have added "use strict"; to all files that were also using ES6 classes and taken the chance to standardize some of the `"use strict";` calls. Solves issue: #20
This should be working in the |
firefox 37 is working
chrome 39 give me these errors.
PS. Also, shouldn't be dependencies like object.assign be in readme? or browser support? at least couple of lines. Thanks.
The text was updated successfully, but these errors were encountered: