OfficeDev / office-ui-fabric-js

JavaScript components for building experiences for Office and Office 365.
http://dev.office.com/fabric
Other
368 stars 114 forks source link

Dropdown in IE11 "Unable to get property 'querySelectorAll' of undefined or null reference" on v1.4 fabric.min.js, Line: 7, Column: 17876 #343

Closed ZachAtAllenPress closed 5 years ago

ZachAtAllenPress commented 6 years ago

I've got a SharePoint Add-In with two drop downs:

            <div id="departments" class="ms-Dropdown ms-Grid-col ms-u-sm3" tabindex="0">
                <label class="ms-Label">Departments</label>
                <i class="ms-Dropdown-caretDown ms-Icon ms-Icon--ChevronDown"></i>
                <select class="ms-Dropdown-select" id="departmentSelect">
                    <option value=""></option>
                </select>
            </div>
            <div id="supervisors" class="ms-Dropdown ms-Grid-col ms-u-sm3" tabindex="0">
                <label class="ms-Label">Supervisors</label>
                <i class="ms-Dropdown-caretDown ms-Icon ms-Icon--ChevronDown"></i>
                <select class="ms-Dropdown-select" id="supervisorSelect">
                    <option value=""></option>
                </select>
            </div>

Which are then initialized by:

                    var DropdownHTMLElements = document.querySelectorAll('.ms-Dropdown');
                    for (var i = 0; i < DropdownHTMLElements.length; ++i) {
                        var Dropdown = new fabric['Dropdown'](DropdownHTMLElements[i]);
                    }

And all other browsers work, but IE11 never loads and throws that error:

"Unable to get property 'querySelectorAll' of undefined or null reference" File: fabric.min.js, Line: 7, Column: 17876

Linda-Editor commented 5 years ago

Microsoft no longer supports this content and will not be responding to bugs or issues. We recommend that you use the newer version, Office UI Fabric, with React as your front-end framework. We are closing this issue; if you still need assistance with Fabric.js, visit Stack Overflow/office-ui-fabric.