Skip to content

Commit dcca77c

Browse files
cpsievertschloerke
andauthored
Fix tab input value updating for BS4 dropdowns (#3412)
* Fix tab input value updating for BS4 dropdowns * Add comments * yarn build (GitHub Actions) * Better comment * yarn lint (GitHub Actions) * yarn build (GitHub Actions) Co-authored-by: Barret Schloerke <[email protected]> Co-authored-by: schloerke <[email protected]> Co-authored-by: cpsievert <[email protected]>
1 parent 871b1ba commit dcca77c

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

inst/www/shared/shiny.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/www/shared/shiny.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

srcts/src/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5958,10 +5958,11 @@ function main(): void {
59585958
},
59595959
getValue: function (el) {
59605960
// prettier-ignore
5961+
// The BS4+ selectors may not work as is for dropdowns within dropdowns, but BS3+ dropped support for those anyway
59615962
let anchor = isBS3()
59625963
? $(el).find("li:not(.dropdown).active > a")
59635964
: $(el).find(
5964-
".nav-link:not(.dropdown-toggle).active, .dropdown-menu > .dropdown-item.active"
5965+
".nav-link:not(.dropdown-toggle).active, .dropdown-menu .dropdown-item.active"
59655966
);
59665967

59675968
if (anchor.length === 1) return this._getTabName(anchor);
@@ -5974,10 +5975,11 @@ function main(): void {
59745975

59755976
if (value) {
59765977
// prettier-ignore
5978+
// The BS4+ selectors may not work as is for dropdowns within dropdowns, but BS3+ dropped support for those anyway
59775979
let anchors = isBS3()
59785980
? $(el).find("li:not(.dropdown) > a")
59795981
: $(el).find(
5980-
".nav-link:not(.dropdown-toggle), .dropdown-menu > .dropdown-item"
5982+
".nav-link:not(.dropdown-toggle), .dropdown-menu .dropdown-item"
59815983
);
59825984

59835985
anchors.each(function () {

0 commit comments

Comments
 (0)