Skip to content

Issues with responsiveness when saving with default width/height configuration #31

@chrishbite

Description

@chrishbite

Expected Behavior

The block should be responsive in both width and height when a user has not specifically chosen to set width and height values.

Actual Behavior

On block addition the containerWidth attribute is being set to a static numeric value and the containerHeight attribute has a default value of 500px, this will lead to the block not scaling correctly when expected to do so as the user did not choose to set specific width and height values in default usage.

Step-by-step reproduction instructions

  1. Add an Image Comparison block
  2. Add both images
  3. Save
  4. Visit frontend
  5. Scale your browsers window down
  6. See that the blocks height is not adjusting and you can no longer see the full image when using the slider

Screenshots, screen recordings, code snippets

N/A

System Information

  • Browser: Firefox Developer Edition 131.0b2 (aarch64)
  • WordPress version: 6.6.1
  • PHP version: 8.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions