Skip to content

Default Alert Module does not hide black overlay when alert is dismissed manually (by clicking on it) #2228

@ashishtank

Description

@ashishtank

Default Alert Module does not hide black overlay when alert is dismissed manually (by clicking on it)

@contactmike1 reported issue on forum and I have confirmed it that Default Alert Module does not hide black overlay when alert is dismissed manually (by clicking on it).

Steps to Reproduce: List the step by step process to reproduce the issue.

as shown in screen shot below when you show alert with out timer and manually dismiss it the black semi transpernt overlay does not hide and block the screen.

this.sendNotification("SHOW_ALERT", {'title':'Hello','message':'World........................ Hello Hello'});

Alert with black overlay
image

Alert is dismissed but overlay is still present
image

Expected Results:

After dismissal of alert the overlay should also removed.

Additional Notes:

Issue is because NotificationFx.js calls the onClose call back but alert.js have not registered the callback handler and thus only alert is removed while overlay stays on the screen.

Alert.js creating the alert

this.alerts[sender.name] = new NotificationFx({
			message: image + message,
			effect: this.config.alert_effect,
			ttl: params.timer,
			al_no: "ns-alert"
		});

NotificationFx calling the onClose callback when it is being dismissed.

NotificationFx.prototype.dismiss = function () {
		this.active = false;
		clearTimeout(this.dismissttl);
		this.ntf.classList.remove("ns-show");
		setTimeout(() => {
			this.ntf.classList.add("ns-hide");

			// callback
			this.options.onClose(); //< -----------
		}, 25);

PR : Is on the way !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions