Semantic-UI-React icon indicating copy to clipboard operation
Semantic-UI-React copied to clipboard

Visibility: Cannot read property 'getBoundingClientRect' of null

Open VikVelev opened this issue 8 years ago • 3 comments

✔ BUGS → This form is required:

Steps

I could not track it down. It is available on your site: https://react.semantic-ui.com/layouts/homepage

Expected Result

Responsiveness

Actual Result

Crashing between 768px and 992px width and less than 320 px.

Version

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
    at Visibility.computeCalculations (Visibility.js:238)
    at Visibility._this.update (Visibility.js:72)
computeCalculations @ Visibility.js:238
Visibility._this.update @ Visibility.js:72
requestAnimationFrame (async)
Visibility._this.handleUpdate @ Visibility.js:67
(anonymous) @ EventTarget.js:31
arrayEach @ _arrayEach.js:15
forEach @ forEach.js:38
(anonymous) @ EventTarget.js:30
(anonymous) @ _createBaseFor.js:17
baseForOwn @ _baseForOwn.js:13
(anonymous) @ _createBaseEach.js:17
forEach @ forEach.js:38
(anonymous) @ EventTarget.js:24

VikVelev avatar Feb 25 '18 16:02 VikVelev

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

welcome[bot] avatar Feb 25 '18 16:02 welcome[bot]

Ok the disappearing of the page seems like it has nothing to do with the Visibility component. I think it's because the source is only considering mobile and desktop and crashes on every resolution that falls between all other categories.

VikVelev avatar Feb 25 '18 16:02 VikVelev

Confirming this. fixed by adding minWidth to the `Responsive' component.

VikVelev avatar Feb 25 '18 16:02 VikVelev