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

Technical problems when using BootstrapModal #3209

Closed
SilverYoCha opened this issue Jun 27, 2023 · 2 comments · Fixed by #3210
Closed

Technical problems when using BootstrapModal #3209

SilverYoCha opened this issue Jun 27, 2023 · 2 comments · Fixed by #3210

Comments

@SilverYoCha
Copy link
Contributor

Technical errors occurs when showing a modal dialog extending BootstrapModal.

To Reproduce
Extending BootstrapModal:

  const MyModalDialog = BootstrapModal.extend({
    id: "my-modal-dialog",
    initialize : function() {
      ...
    },
    ...
  });

And showing it:

  function showMyDialog(ev) {
    ev.preventDefault();
    const chatView = getChatViewFromElement(ev.currentTarget);
    const myDialogModel = new Model();
    _converse.api.modal.show(MyModalDialog, {
      'model': myDialogModel,
      'chatroomview': chatView
    }, ev);
  }

Then occurring javascript errors:
image

Expected behavior
The modal dialog opens without any javascript error.

SilverYoCha added a commit to SilverYoCha/converse.js that referenced this issue Jun 27, 2023
Fixing some technical errors when avoiding importing the `converse` global with bootstrap modal API.
@SilverYoCha SilverYoCha linked a pull request Jun 27, 2023 that will close this issue
jcbrand pushed a commit that referenced this issue Jun 27, 2023
Fixing some technical errors when avoiding importing the `converse` global with bootstrap modal API.
@jcbrand
Copy link
Member

jcbrand commented Jun 27, 2023

Thanks @SilverYoCha, next time, please remember to update CHANGES.md

@SilverYoCha
Copy link
Contributor Author

SilverYoCha commented Jun 27, 2023

Yes you're right @jcbrand , sorry!

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

Successfully merging a pull request may close this issue.

2 participants