Skip to content

[bug] - Editor property #201

Closed
Closed

Description

@nlemoine

Description

When using more than one editor property in a flexible, the first one is but the others editors are not rendered correctly. They are stuck on the "text" tab, "visual" tab can't be clicked.

Steps to reproduce

papi_property( [
  'title'    => 'Flexible',
  'slug'     => 'my_flexible_slug',
  'type'     => 'flexible',
  'settings' => [
    'items' => [
      [
        'title' => 'Posts',
        'items' => [
          papi_property( [
            'type'  => 'editor',
            'title' => 'Title',
            'slug'  => 'my_string_slug'
          ] ),
          papi_property( [
            'type'  => 'editor',
            'title' => 'Post',
            'slug'  => 'my_post_slug'
          ] )
        ]
      ],
    ]
  ]
] )

What versions of softwares are you using?

  • Browser: Chrome latest
  • Papi: dev-master
  • WordPress: latest

Activity

  1. frozzare commented on Oct 21, 2016

    @frozzare
    Member

    Is this only a problem in master branch or a problem with the latest stable version? Note that master branch is unstable and should not be used on real sites :)

  2. nlemoine commented on Oct 21, 2016

    @nlemoine
    ContributorAuthor

    Sorry, confirmed with 3.1.15 ;)

  3. frozzare commented on Oct 23, 2016

    @frozzare
    Member

    skarmklipp 2016-10-23 12 57 51

    Isn't this right? Both are rendered with visual tab and both text tabs can be clicked. Tested with 3.x branch (that will be 3.1.16).

  4. self-assigned this
    on Oct 23, 2016
  5. nlemoine commented on Oct 23, 2016

    @nlemoine
    ContributorAuthor

    I didn't think the layout could be involved but the bug only occurs when layout is set to vertical:

    papi_property( [
      'title'    => 'Flexible',
      'slug'     => 'my_flexible_slug',
      'type'     => 'flexible',
      'settings' => [
        'layout' => 'vertical',
        'items' => [
          [
            'title' => 'Posts',
            'items' => [
              papi_property( [
                'type'  => 'editor',
                'title' => 'Title',
                'slug'  => 'my_string_slug'
              ] ),
              papi_property( [
                'type'  => 'editor',
                'title' => 'Post',
                'slug'  => 'my_post_slug'
              ] )
            ]
          ],
        ]
      ]
    ] )
  6. frozzare commented on Oct 23, 2016

    @frozzare
    Member

    Yeah, that did cause the bug. The problem was that it assume that it was a tbody around both properties and not a single on when vertical layout is used. So the editors did get the same id and that isn't ok with tinmyce.

    Fixed in 3.x and master and will be out in next 3.x versions coming soon.

  7. nlemoine commented on Oct 24, 2016

    @nlemoine
    ContributorAuthor

    Thanks! 👍

  8. frozzare commented on Oct 25, 2016

    @frozzare
    Member

    Is this only a problem in master branch or a problem with the latest stable version? Master branch is unstable and should not be used.

    On 21 okt. 2016 12:58 +0200, Nico [email protected], wrote:

    Description

    When using more than one editor property in a flexible, the second editor is not rendered correctly. The second field is stuck on the "text" tab, "visual" tab can't be clicked.

    Steps to reproduce
    papi_property( [ 'title' => 'Flexible', 'slug' => 'my_flexible_slug', 'type' => 'flexible', 'settings' => [ 'items' => [ [ 'title' => 'Posts', 'items' => [ papi_property( [ 'type' => 'editor', 'title' => 'Title', 'slug' => 'my_string_slug' ] ), papi_property( [ 'type' => 'editor', 'title' => 'Post', 'slug' => 'my_post_slug' ] ) ] ], ] ] )

    What versions of softwares are you using?
    Browser: Chrome latest
    Papi: dev-master
    WordPress: latest

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub (#201), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAA5EkMLv9GBXK2xC-t-WMzACfOYktT7ks5q2JrDgaJpZM4KdHGB).

  9. nlemoine commented on Oct 25, 2016

    @nlemoine
    ContributorAuthor

    The issue has already been resolved.

  10. frozzare commented on Oct 25, 2016

    @frozzare
    Member

    @nlemoine the email did get stuck on my phone last week, sorry for that.

  11. nlemoine commented on Oct 25, 2016

    @nlemoine
    ContributorAuthor

    No problem ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions