Skip to content

Subscribe Block - Submit Button Not Full Width When Using New Line Option #78598

Closed
@katiebethbrown

Description

@katiebethbrown

Quick summary

When the Place button on new line option is enabled the submit button is not displaying at the expected width.

Steps to reproduce

  1. Add a Subscribe Block.
  2. Enable the Place button on new line setting.
  3. Ensure the width is set to 100%.

What you expected to happen

For the submit (Subscribe) button to display at 100%

What actually happened

The button in the editor displays as expected.

The button on the live site displays at the set width, less the value set for Space Between. This is especially obvious when the button should be 100%.

Editor Live Site

The issue occurs on WPcom and Jetpack sites.

Impact

All

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple, Atomic, Self-hosted

Logs or notes

Some testing reveals that the width of the button is always the set width (in this case 100%), less the value set in the Space Between setting:

We're subtracting that value to account for custom margins on inline forms:

https://github.com/Automattic/jetpack/blob/b9489caab2ec05cb8248a3ceb8296a44d6482d3f/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php#L361-L365

which makes sense for when the two are on the same line, but we should not subtract that space when the buttons are not on the same line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Customer ReportIssues or PRs that were reported via Happiness. Previously known as "Happiness Request".[Block] SubscriptionsSubscribe block[Pri] LowAddress when resources are available.[Type] BugWhen a feature is broken and / or not performing as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions