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

Upload widget paste listener ignores changes in the uploadWidgetDefinition #1068

Closed
mlewand opened this issue Oct 19, 2017 · 0 comments
Closed
Labels
changelog:api A changelog entry should be put in the API section of the changelog. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:uploadwidget 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 19, 2017

Are you reporting a feature or a bug?

Bug

Provide detailed reproduction steps (if any)

  1. Open https://codepen.io/mlewand/pen/mBvxeM.
  2. Open developer console.
  3. Drag any jpg file from your desktop, and drop it over the editor's editable.

Expected result

Black square should appear, no exceptions of missing method should be logged in the console.

Actual result

Exception Uncaught TypeError: d[m] is not a function is reported.

Other details

Reason why it happens is because addUploadWidget function in widgetupload plugin uses def that was given as an argument for the very first time. This object can not be modified by the widgetDefinition listeners.

The solution here is to simply get the definition from widgetRepository in paste listener.

Reproducible in all browsers.

@mlewand mlewand changed the title Uploadwidget paste listener ignores changes in the uploadWidgetDefinition Upload widget paste listener ignores changes in the uploadWidgetDefinition Oct 19, 2017
@mlewand mlewand added plugin:uploadwidget The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. type:bug A bug. labels Oct 19, 2017
@mlewand mlewand added this to the Backlog milestone Nov 9, 2017
@mlewand mlewand added the target:major Any docs related issue that should be merged into a major branch. label Nov 9, 2017
@mlewand mlewand modified the milestones: Backlog, 4.8.0 Nov 9, 2017
@mlewand mlewand added the changelog:api A changelog entry should be put in the API section of the changelog. label Dec 1, 2017
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. good first issue Relatively easy to fix. This is a perfect issue if you are willing to create a Pull Request. plugin:uploadwidget 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

No branches or pull requests

1 participant