diff --git a/src/GinContentFormHelper.php b/src/GinContentFormHelper.php index b75ff1adf2b74e5e19f08a2957ca3e6c1afb1b78..189e6503113833c0ff129f5f1a95de131247ff51 100644 --- a/src/GinContentFormHelper.php +++ b/src/GinContentFormHelper.php @@ -85,7 +85,7 @@ class GinContentFormHelper implements ContainerInjectionInterface { $is_content_form = $this->isContentForm($form, $form_state, $form_id); // Sticky action buttons. - if (($use_sticky_action_buttons || $is_content_form) && isset($form['actions'])) { + if ($use_sticky_action_buttons && isset($form['actions'])) { // Add sticky class. $form['actions']['#attributes']['class'][] = 'gin-sticky-form-actions'; @@ -264,8 +264,10 @@ class GinContentFormHelper implements ContainerInjectionInterface { // Get route name. $route_name = $this->routeMatch->getRouteName(); - // Sets default to TRUE if setting is enabled. - $sticky_action_buttons = $settings->get('sticky_action_buttons') ? TRUE : FALSE; + // Sets default to TRUE if setting is enabled or if this is a content form. + $sticky_action_buttons = $settings->get('sticky_action_buttons') + ? TRUE + : $this->isContentForm($form, $form_state, $form_id); // API check. $form_ids = $this->moduleHandler->invokeAll('gin_ignore_sticky_form_actions');