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

Undefined dataset on language select in Settings-Screen #176

Open
JulianSchoenbaechler opened this issue Jan 11, 2024 · 0 comments
Open

Comments

@JulianSchoenbaechler
Copy link

When clicking on the arrow-icon [data-select="set-language"] of the language selection dropdown the action will break with:

Uncaught TypeError: t.dataset is undefined

The erroneous code is this piece right here:

// Fix for select labels
this.engine.on ('click', '[data-select]', () => {
	const e = document.createEvent ('MouseEvents');
	e.initMouseEvent ('mousedown');
	this.engine.element ().find (`[data-action='${this.dataset.select}']`).first ().dispatchEvent (e);
});

I'm guessing that the this inside the arrow function does not refer to the actual HTMLElement of the icon.

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

No branches or pull requests

1 participant