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

each button in image editor will trigger form submit #484

Open
sanluan opened this issue Jul 26, 2024 · 1 comment
Open

each button in image editor will trigger form submit #484

sanluan opened this issue Jul 26, 2024 · 1 comment
Labels

Comments

@sanluan
Copy link

sanluan commented Jul 26, 2024

if we add the plugin to a form , then our form is sent if we click on one of the plugin's buttons.

<form onsubmit="alert('submit')">
<div id="editor_container"></div>
</form>
<script>
var filerobotImageEditor = new FilerobotImageEditor(
  document.querySelector("#editor_container"),
  filerobotImageEditorConfig,
);

filerobotImageEditor.render({
  onClose: (closingReason) => {
    filerobotImageEditor.terminate();
  },
});
</script>
@sanluan sanluan added the unseen label Jul 26, 2024
@sanluan
Copy link
Author

sanluan commented Jul 26, 2024

Temporary workaround:

$("#editor_container").on("click","button",function(){
    return false;
});

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

No branches or pull requests

1 participant