Scroll to the tab
This commit is contained in:
parent
a9e60aad2e
commit
6ad2b1f93a
1 changed files with 6 additions and 0 deletions
|
@ -131,6 +131,12 @@ class Tabs {
|
||||||
((nested.dictionary.get(this, [name, `elements`, `tabs`, ID, `header`]) && ((nested.dictionary.get(options, [`automatic`]) != null) ? !options[`automatic`] : true))
|
((nested.dictionary.get(this, [name, `elements`, `tabs`, ID, `header`]) && ((nested.dictionary.get(options, [`automatic`]) != null) ? !options[`automatic`] : true))
|
||||||
? ((this[name][`elements`][`tabs`][ID][`container`].classList.contains(`active`)) ? false : this[name][`elements`][`tabs`][ID][`header`].click())
|
? ((this[name][`elements`][`tabs`][ID][`container`].classList.contains(`active`)) ? false : this[name][`elements`][`tabs`][ID][`header`].click())
|
||||||
: false);
|
: false);
|
||||||
|
|
||||||
|
// Scroll to the tab.
|
||||||
|
if (nested.dictionary.get(this, [name, `elements`, `tabs`, ID, `header`])) {
|
||||||
|
// Scroll to the tab.
|
||||||
|
this[name][`elements`][`tabs`][ID][`header`].scrollIntoView({"behavior": "smooth", "block": "start"});
|
||||||
|
};
|
||||||
|
|
||||||
// Remove the lock.
|
// Remove the lock.
|
||||||
this[`status`][`opening`] = false;
|
this[`status`][`opening`] = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue