Skip to content

Sibling w/ relative or absolute positioning can cause react-ink not to work #18

Open
@ashtonsix

Description

@ashtonsix

This also applies to children of siblings, and seems to depend on the order of elements. I believe the positioning messes w/ z-levels which means click events don't always propogate to react-ink.

Examples:
#1 Does work:

button([
  Ink()])

#2 Does work:

button([
  Ink(),
  span('text')])

#3 Doesn't work:

button([
  Ink(),
  span({style: {position: 'relative'}, 'text')])

#4 Doesn't work:

button([
  Ink(),
  div([
    span({style: {position: 'relative'}, 'text')])])

#5 Doesn't work:

button([
  Ink(),
  div([
    span({style: {position: 'relative'}, 'text'),
    span('text')])])

#6 Does work:

button([
  Ink(),
  div([
    span('text'),
    span({style: {position: 'relative'}, 'text')])])

#7 Does work (best workaround)

button([
  span({style: {position: 'relative'}, 'text'),
  Ink()])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions