Skip to content

Conversation

@rawrmonstar
Copy link
Contributor

Description

The default props for <Appear /> makes untransitioned elements invisible, but they still register pointer-events (e.g., a <Link />). This just adds pointerEvents: "none" to the starting state so invisible elements do not register clicks.

Fixes #397

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Manually through spectacle-boiler-plate.

export default class Presentation extends React.Component {
  render() {
    return (
      <Deck
        showFullscreenControl={true}
        transition={["zoom", "slide"]}
        transitionDuration={500}
      >
        <Slide
          transition={["slide"]}
          bgImage={
            "https://cdn.rawgit.com/FormidableLabs/spectacle/master/example/assets/city.jpg"
          }
          bgDarken={0.75}
        >
          <Appear fid="1">
            <Heading size={1} caps fit textColor="primary">
              Test Slide
            </Heading>
          </Appear>
          <Appear fid="2">
            <Link
              href="#link"
              textColor="primary"
              style={{ textDecoration: "underline" }}
            >
              Some Link
            </Link>
          </Appear>
        </Slide>
      </Deck>
    );
  }

Copy link
Contributor

@ebrillhart ebrillhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rawrmonstar rawrmonstar merged commit 93337e0 into master Dec 27, 2018
@rawrmonstar rawrmonstar deleted the rawrmonstar/fix-clickable-hidden-appear branch December 27, 2018 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: links are clickable inside hidden Appear

3 participants