8000 [bug] - Editor property · Issue #201 · wp-papi/papi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[bug] - Editor property #201

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

Closed
nlemoine opened this issue Oct 21, 2016 · 10 comments
Closed

[bug] - Editor property #201

nlemoine opened this issue Oct 21, 2016 · 10 comments
Assignees

Comments

@nlemoine
Copy link
Contributor
nlemoine commented Oct 21, 2016

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
@frozzare
Copy link
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 :)

@nlemoine
Copy link
Contributor Author

@frozzare
Copy link
Member

Sorry, confirmed with 3.1.15 ;)

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).

@frozzare frozzare self-assigned this Oct 23, 2016
@nlemoine
Copy link
Contributor Author

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'
          ] )
        ]
      ],
    ]
  ]
] )

@frozzare
Copy link
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.

@nlemoine
Copy link
Contributor Author

Thanks! 👍

@frozzare
Copy link
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 notifications@github.com, 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).

@nlemoine
Copy link
Contributor Author

The issue has already been resolved.

@frozzare
Copy link
Member

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

@nlemoine
Copy link
Contributor Author

No problem ;)

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

No branches or pull requests

2 participants
0