Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

:active style getting stuck - mouse_up_listener error showing in console #1034

Open
dancherb opened this issue Dec 4, 2019 · 2 comments
Open

Comments

@dancherb
Copy link

dancherb commented Dec 4, 2019

The style given for ":active" persists, even after releasing the mouse. The console shows the below error.

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at resolve-interaction-styles-plugin.js:85
    at mouse-up-listener.js:6
    at Array.forEach (<anonymous>)
    at _handleMouseUp (mouse-up-listener.js:5)

Demo component:


import React, { Component } from 'react';
import Radium from 'radium';

class Checkbox extends Component {
    render() {
        return(
            <div 
                style={{
                    backgroundColor: "red",
                    height: 30,
                    width: 30,
                    opacity: 1,
                    ":active": {
                        opacity: 0.6,
                    }
                }}
            />
        )
    }
}

export default Radium(Checkbox)

Versions:

"react": "^16.12.0",
"radium": "^0.26.0",
@andres-torres-marroquin
Copy link

andres-torres-marroquin commented Jan 6, 2020

I tried that Demo component, I wasn't able to make it fail, however when I converted it to a functional component I saw the error thereafter.

@nathanmarks
Copy link
Contributor

Taking a look now -- we've encountered the same issue

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

No branches or pull requests

3 participants