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

Widget definition upcats methods are called for every element #1094

Closed
mlewand opened this issue Oct 26, 2017 · 0 comments · Fixed by #1100
Closed

Widget definition upcats methods are called for every element #1094

mlewand opened this issue Oct 26, 2017 · 0 comments · Fixed by #1100
Labels
changelog:api A changelog entry should be put in the API section of the changelog. plugin:widget The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:bug A bug.
Milestone

Comments

@mlewand
Copy link
Contributor

mlewand commented Oct 26, 2017

Are you reporting a feature or a bug?

Bug

Provide detailed reproduction steps (if any)

See widget.definition.upcasts API docs, it shows that e.g. upcasts.figure should be called only for figure elements. But based on attached codepen it does not work that way.

  1. Open https://codepen.io/mlewand/pen/jGgjgG?editors=1010.
  2. Open developer console.
  3. Watch the console log.

Expected result

Only one entry is logged:

upcasting element: u

That's because upcasts.u should be called only for u elem.

Actual result

Function is executed for just any element.

upcasting element: p
upcasting element: strong
upcasting element: em
upcasting element: p
upcasting element: u
@Comandeer Comandeer added plugin:widget The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug. labels Oct 26, 2017
@mlewand mlewand added target:major Any docs related issue that should be merged into a major branch. changelog:api A changelog entry should be put in the API section of the changelog. labels Oct 30, 2017
@mlewand mlewand changed the title Widget definition's upcats method called for any elements Widget definition's upcats method is called for every element Oct 30, 2017
@mlewand mlewand changed the title Widget definition's upcats method is called for every element Widget definition upcats methods are called for every element Oct 30, 2017
mlewand added a commit that referenced this issue Oct 30, 2017
#1094 Upcast method invoked only for specified element
@mlewand mlewand added this to the 4.8.0 milestone Oct 30, 2017
mlewand added a commit that referenced this issue Nov 5, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
mlewand added a commit that referenced this issue Nov 5, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
@mlewand mlewand mentioned this issue Nov 5, 2017
2 tasks
mlewand added a commit that referenced this issue Nov 6, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Nov 13, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Dec 5, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Dec 27, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Dec 27, 2017
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
mlewand added a commit that referenced this issue Feb 5, 2018
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Feb 6, 2018
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Comandeer pushed a commit that referenced this issue Feb 6, 2018
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
jacekbogdanski pushed a commit that referenced this issue Feb 17, 2018
…nt name in widget upcasts handler.

Also removed fake elements check, as fake elements are only imgs, not figures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:api A changelog entry should be put in the API section of the changelog. plugin:widget The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. target:major Any docs related issue that should be merged into a major branch. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants