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

module.suspend not called if module does not have dom content #1308

Closed
sdetweil opened this issue Jun 7, 2018 · 2 comments
Closed

module.suspend not called if module does not have dom content #1308

sdetweil opened this issue Jun 7, 2018 · 2 comments

Comments

@sdetweil
Copy link
Collaborator

sdetweil commented Jun 7, 2018

Please only submit reproducible issues.

If you're not sure if it's a real bug or if it's just you, please open a topic on the forum: https://forum.magicmirror.builders/category/15/bug-hunt
Problems installing or configuring your MagicMirror? Check out: https://forum.magicmirror.builders/category/10/troubleshooting

When submitting a new issue, please supply the following information:

Platform: Ubuntu Mate on ODROID xu4

Node Version: v6.14.2

MagicMirror Version: 2.3.1

Description: my modules, which have no dom content (and no position specified in config) do not receive the suspend notification.

Steps to Reproduce: create the default module as defined in the doc, but only supply the module name in config.js
at this point issue a module.hide() against this module, but its suspend method will not be called.

Expected Results: module suspend() function should be called

Actual Results: suspend not called (resume is)

Configuration: ```
{
module: "ImageScheduler",
},
{
module: "ImageService",
},


**Additional Notes**: Provide any other relevant notes not previously mentioned. This is optional.

this is due to the test for dom content in js/main.js/hideModule()
var moduleWrapper = document.getElementById(module.identifier);
    if (moduleWrapper !== null) {
there should be an else, to invoke the (post fade timeout)callback setup in js/module.js/hide()
}
else
     if (typeof callback === "function") { callback(); }
      
@MichMich
Copy link
Collaborator

MichMich commented Jun 7, 2018

Thanks. Feel free to send a PR.

@sdetweil
Copy link
Collaborator Author

pr merged july 2018,
#1309

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

No branches or pull requests

2 participants