storybook-addon-actions icon indicating copy to clipboard operation
storybook-addon-actions copied to clipboard

Passing event.target causes Storybook to hang

Open TheSisb opened this issue 8 years ago • 1 comments

I have a story that passes onFocus={action('Focused')} The component is an input element with onFocus={this.onFocus}

onFocus = e => {
  this.props.onFocus && this.props.onFocus(e.target);  // App hangs.  'e' alone is fine.
};

TheSisb avatar Jan 19 '17 00:01 TheSisb

Can reproduce. I'm getting incredibly slow responses from action. Click handler takes about a second, and seems to be stuck stringifying an html element:

image

As a quick workaround I suggest the serializer should specifically ignore dom elements.

Why does it need to stringify at all?

timoxley avatar Mar 20 '17 07:03 timoxley