bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

Uncaught TypeError: Cannot read property 'Constructor' of undefined

Open gavinju opened this issue 6 years ago • 26 comments

When I upgraded from 1.13.12 to the 1.13.14 version, some errors occurred: “Uncaught TypeError: Cannot read property 'Constructor' of undefined”

I found there is new code in 1.13.14: // get Bootstrap's keydown event handler for either Bootstrap 4 or Bootstrap 3 var bootstrapKeydown = $.fn.dropdown.Constructor._dataApiKeydownHandler || $.fn.dropdown.Constructor.prototype.keydown;

Please help me, how to solve this problem? thank you very much!

Bootstrap version 4.3.1

JQuery version 3.4.1

Bootstrap-Select version 1.13.14

OS: Windows 10, macOS

gavinju avatar Apr 18 '20 20:04 gavinju

Released in v1.13.15!

caseyjhol avatar Apr 21 '20 00:04 caseyjhol

using 1.13.18 facing the same issue 👎

Skillnter avatar Aug 07 '20 08:08 Skillnter

Error still occuring.

CollectionAgency avatar Sep 25 '20 00:09 CollectionAgency

Just downloaded the last release and the error is still there. Fixed by put the js link at the bottom of the page.

RamonaBarbieru avatar Oct 19 '20 14:10 RamonaBarbieru

Its caused by bootstrap js(with draggable js) loading after bootstrap-select js

TheGP avatar Nov 05 '20 07:11 TheGP

Try include the bootstrap js script (as what I've used from here for bootstrap v4.6). Or use the respective versions that come with the boostrap css's version.

I tried including the bootstrap script and the issue is fixed.

offlineC avatar Feb 19 '21 07:02 offlineC

Try to use bootstrap 4.6.0 and try to load bootstrap base files before SELECT plugin js and CSS files.

manager-wiseTech avatar Aug 20 '21 15:08 manager-wiseTech

I'm using Bootstrap 5.1 and loading it before the select plugin. Still, got that issue... any solution?

shirgans avatar Dec 13 '21 17:12 shirgans

I managed to fix that after taking the exact version as in here

shirgans avatar Dec 14 '21 06:12 shirgans

I managed to fix that after taking the exact version as in here

Thank you my man

nurmuhammet-ali avatar Feb 02 '22 07:02 nurmuhammet-ali

I managed to fix that after taking the exact version as in here

thanks man

iheblhbib avatar Feb 02 '22 12:02 iheblhbib

I managed to fix that after taking the exact version as in here

Fixed this for me, as well. Thanks!

jthomp avatar Apr 14 '22 21:04 jthomp

I managed to fix that after taking the exact version as in here

damn 2022 and this is still the solution

RenrevZ avatar Jun 18 '22 10:06 RenrevZ

I managed to fix that after taking the exact version as in here

Worked for me. Thanks.

andrewsemchism avatar Jul 12 '22 04:07 andrewsemchism

I managed to fix that after taking the exact version as in here

Excelent!! Working here with Bootstrap 5.20

isackblue avatar Jul 29 '22 19:07 isackblue

I managed to fix that after taking the exact version as in here

Thanks very much for your answer, i spent roughly a couple of hours looking for a good cdn solution

ekane3 avatar Aug 03 '22 13:08 ekane3

I can confirm this is fixed by latest bootstrap-select beta2 or beta3 https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap-select.min.js

iankucera avatar Oct 07 '22 08:10 iankucera

I can confirm this is fixed by latest bootstrap-select beta2 or beta3 https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap-select.min.js

its works, thanks!!

muhismail015 avatar Dec 08 '22 14:12 muhismail015

It's working, thanks

mithunkottayi avatar Dec 20 '22 07:12 mithunkottayi

I can confirm this is fixed by latest bootstrap-select beta2 or beta3 https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap-select.min.js

Thks

wliontb avatar Jan 31 '23 08:01 wliontb