Problem/Motivation

The class form-group gets added to the div representing the focal point. We show the form using our main theme, which applies a bottom margin with this class (Bootstrap), making the preview image offset from the marker by about 15px.

The focal marker div is currently built by creating a render array with an empty markup and wrapping it using the "container" render element. This not only feels semantically incorrect to me, as there is no actual group of form elements to wrap, and a bit verbose as all kinds of classes get applied to the container by default (including form-group).

Proposed resolution

Build the marker with '#type' => 'html_tag' instead. No extra classes and more semantically correct result.

CommentFileSizeAuthor
focal_point-wrapper.patch829 bytesTwoD
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TwoD created an issue. See original summary.

guile2912’s picture

Works like a charm, thanks a lot for the patch

bleen’s picture

Status: Needs review » Reviewed & tested by the community

This seems reasonable to me ... thanks for the patch!

  • bleen committed e71d033 on 8.x-1.x authored by TwoD
    Issue #2844533 by TwoD: Simplify markup for focal indicator
    
bleen’s picture

Title: Focal marker offset in preview » Simplify markup for focal point indicator
bleen’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.