Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected association fields not concatenating #799

Closed
garrettmasters opened this issue Dec 5, 2019 · 0 comments · Fixed by #833
Closed

Selected association fields not concatenating #799

garrettmasters opened this issue Dec 5, 2019 · 0 comments · Fixed by #833

Comments

@garrettmasters
Copy link

Version

  • Carbon Fields: 3.1.8
  • WordPress: 5.2.4
  • PHP: 7.2

Expected Behavior

Long post titles to concatenate and add ellipses on association fields.

Actual Behavior

Once association title is selected the post title is no longer concatenated.
https://ibb.co/Wc69RtD

Container definition

Container::make( 'post_meta', __( 'Page Builder', 'page_builder' ) )
        ->add_fields( array(
            Field::make( 'complex', 'uikit_sections', 'Sections' )
              ->set_layout('tabbed-vertical')
              ->add_fields( 'blog_post', 'Blog', array(
               Field::make( 'association', 'blog_relationship', 'Blog Entries' )
                  ->set_types( array(
                      array(
                          'type'      => 'post',
                          'post_type' => 'post',
                      )
                  ))
               ))
        ));

Steps to Reproduce the Problem

  1. Make sure post title is more than 85 characters
  2. Select 85+ character title.

Comments

It look like the selected fields are missing a span class that is concatenating the titles:

HTML of association post list (before selection)

<span class="cf-association__option-title">
    <span class="cf-association__option-title-inner">
        Consectetur adipi sicing elit sed do eius consectetur adipi sicing elit sed do eius
    </span>
</span>

HTML of association post list (after selection)

<span class="cf-association__option-title">
    Consectetur adipi sicing elit sed do eius Consectetur adipi sicing elit sed do eius
</span>

If the "cf-association__option-title-inner" span class is added inside the "cf-association__option-title" span class then the selected title will concatenate also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant