Skip to content

Commit

Permalink
Fix layout column problem when GF Styles Pro enabled
Browse files Browse the repository at this point in the history
Move the grid CSS classes first in the class order, so that they aren't removed due to an mPDF processing bug when there are a lot of classes.
  • Loading branch information
jakejackson1 committed Feb 25, 2024
1 parent b9d16b6 commit 72c2633
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Gravity PDF can be run on most modern shared web hosting without any issues. It

= 6.8.1 =
* Bug: Fix Form Editor saving problem for Gravity Forms v2.6.*
* Bug: Fix Drag and Drop Column layout issue when the GF Styles Pro plugin is enabled

= 6.8.0 =
* Feature: Add PDF Download metabox to Gravity Flow Inbox for logged-in users with appropriate capability
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Helper_Field_Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ protected function process_skipped_fields( GF_Field $field ) {
* @since 4.0
*/
protected function strip_field_of_any_classmaps( GF_Field $field ) {
$field->cssClass = str_replace( array_keys( $this->class_map ), ' ', $field->cssClass );
$field->cssClass = trim( str_replace( array_keys( $this->class_map ), ' ', $field->cssClass ) );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Helper/Helper_Field_Container_Gf25.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function generate( GF_Field $field ) {
parent::generate( $field );

if ( $this->get_field_width( $field ) < 100 && strpos( $field->cssClass, 'grid grid-' ) === false ) {
$field->cssClass .= ' grid grid-' . $field->layoutGridColumnSpan;
$field->cssClass = trim( 'grid grid-' . $field->layoutGridColumnSpan . ' ' . $field->cssClass );
}

/* Mark as the end of this row */
Expand Down

0 comments on commit 72c2633

Please sign in to comment.