我在 IE 11 上运行 AngularJs (1.6) 应用程序时遇到问题,当用户输入一些文本和表情符号图标时,它会崩溃并关闭浏览器。10-20次中有2次,我遇到了这个问题。我怀疑内存泄漏,但同时,如果应用程序不需要用户输入,它就没有崩溃。我想知道是否有人可以帮助我解决这个问题。
图书馆:
<script src="js/lib/jquery.js"></script>
<script src="js/lib/lodash.min.js"></script>
<script src="js/lib/angular.min.js"></script>
<script src="js/lib/emoji-picker.min.js"></script>
<script src="js/lib/rzslider.min.js"></script>
<script src="js/lib/angular-rating-icons.js"></script>
<script src="js/lib/ui-bootstrap-tpls.min.js"></script>
用户输入部分:
<div ng-if="showInput" class="slide-top" id="inputBox">
<div class="inputMessageHeader" ng-i18next="chatbot.userinput.title" ng-attr-style="background-color: {{primaryColor}}" style="background-color: {{primaryColor}}"></div>
<form class="full-height">
<div layout="row">
<div flex id="inputUser">
<textarea maxlength="2000"
ng-model="components[currentQaIndex].usrMessage"
ng-i18next="[placeholder]chatbot.userinput.placeholder"
rows="5" ng-keyup="countCharacters()"
ng-change="hideEmojiPicker()">
</textarea>
<div class="counter"><span ng-class="{error: components[currentQaIndex].usrMessage.length > 2000}"> {{components[currentQaIndex].usrMessage.length || 0}} </span> / 2000</div>
</div>
<div id="gifArea" ng-if="messageGifUrl" flex="45">
<img ng-src="{{messageGifUrl}}" />
<md-button id="gifEdit" ng-click="toggleGifPopup()" aria-label="edit" class="md-icon-button launch fa fa-pencil-square-o"></md-button>
<md-button id="gifDelete" ng-click="deleteGif()" aria-label="delete" class="md-icon-button launch fa fa-trash-o"></md-button>
</div>
</div>
<div id="separatorLine"></div>
<div class="form-action">
<div class="gif-btns">
<div emoji-picker="components[currentQaIndex].usrMessage" title="Emoji" placement="top" output-format="unicode" class="emoji" ng-click="toggleEmojiPicker()" ng-class="{active: emojiVisible}" on-change-func="hideEmojiPicker">
</div>
<span class="gif" ng-click="toggleGifPopup()" ng-class="{active: gifPopupVisible}"></span>
<span class="gallery"></span>
<span class="camera"></span>
</div>
<div class="btns" >
<span ng-i18next="chatbot.calltoactions.cancel" class="blink-btn" ng-attr-style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" ng-mouseenter="setDarkerColor($event)" ng-mouseleave="setPrimaryColor($event)" ng-click="onCancelQuestion()" ng-if="isOther" ></span>
<span ng-i18next="chatbot.calltoactions.ok" class="blink-btn" ng-attr-style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" ng-mouseenter="setDarkerColor($event)" ng-mouseleave="setPrimaryColor($event)" ng-click="onSaveUserMessage($event)" ng-if="isOther"></span>
<span ng-i18next="chatbot.calltoactions.validate" class="blink-btn" ng-attr-style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" ng-mouseenter="setDarkerColor($event)" ng-mouseleave="setPrimaryColor($event)" ng-click="onSubmitAnswer($event)" ng-if="!isOther"></span>
<span ng-i18next="chatbot.calltoactions.skip" class="blink-btn" ng-attr-style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" style="color: {{primaryColor}}; border-bottom-color: {{primaryColor}}" ng-mouseenter="setDarkerColor($event)" ng-mouseleave="setPrimaryColor($event)" ng-click="onSkipQuestion($event)" ng-if="components[currentQaIndex].options.is_skippable && !isOther" ></span>
</div>
</div>
</form>
</div>