CKFinder TypeError:t.event.special.swipe未定义

时间:2016-02-12 07:44:36

标签: javascript jquery jquery-mobile ckeditor ckfinder

在Firefox 44.0上使用CKFinder 3.2.0时收到以下错误。 它仅在Firefox上发生,在Chrome上完全正常。

知道可能导致它的原因以及如何解决它?

TypeError: t.event.special.swipe is undefined
Stack trace:
CKFinder</<._setup/</<.init@https://10.10.10.20/ckfinder/ckfinder.js:8:8
CKFinder</<._setup/</<.start/</<@https://10.10.10.20/ckfinder/ckfinder.js:19:9706
newContext/y.execCb@https://10.10.10.20/ckfinder/ckfinder.js:5:26980
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:20584
newContext/C.prototype.enable@https://10.10.10.20/ckfinder/ckfinder.js:5:23528
newContext/C.prototype.init@https://10.10.10.20/ckfinder/ckfinder.js:5:19790
o/<@https://10.10.10.20/ckfinder/ckfinder.js:5:25339
setTimeout handler*CKFinder</<._setup/</</req.nextTick<@https://10.10.10.20/ckfinder/ckfinder.js:5:29067
o@https://10.10.10.20/ckfinder/ckfinder.js:5:25278
CKFinder</<._setup/</</requirejs@https://10.10.10.20/ckfinder/ckfinder.js:5:28955
CKFinder</<._setup/</<.start/<@https://10.10.10.20/ckfinder/ckfinder.js:19:9598
n.Callbacks/j@https://10.10.10.20/ckfinder/libs/jquery.js?ver=js6uhv:2:26920
n.Callbacks/k.fireWith@https://10.10.10.20/ckfinder/libs/jquery.js?ver=js6uhv:2:27738
.Deferred/</e[f[0]]@https://10.10.10.20/ckfinder/libs/jquery.js?ver=js6uhv:2:28704
CKFinder</<._setup/</r.init/<@https://10.10.10.20/ckfinder/ckfinder.js:7:29367
s@https://10.10.10.20/ckfinder/ckfinder.js:7:27199
newContext/y.execCb@https://10.10.10.20/ckfinder/ckfinder.js:5:26980
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:20584
newContext/C.prototype.enable/</<@https://10.10.10.20/ckfinder/ckfinder.js:5:23189
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
newContext/C.prototype.emit/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23667
each@https://10.10.10.20/ckfinder/ckfinder.js:5:14253
newContext/C.prototype.emit@https://10.10.10.20/ckfinder/ckfinder.js:5:23635
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:21305
newContext/C.prototype.enable@https://10.10.10.20/ckfinder/ckfinder.js:5:23528
newContext/C.prototype.init@https://10.10.10.20/ckfinder/ckfinder.js:5:19790
newContext/C.prototype.callPlugin/</r<@https://10.10.10.20/ckfinder/ckfinder.js:5:22166
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
CKFinder</<._setup/</t.finishLoad@https://10.10.10.20/ckfinder/ckfinder.js:9:24377
CKFinder</<._setup/</t.load/<@https://10.10.10.20/ckfinder/ckfinder.js:9:24651
CKFinder</<._setup/</t.get/s.onreadystatechange@https://10.10.10.20/ckfinder/ckfinder.js:9:25864
EventHandlerNonNull*CKFinder</<._setup/</t.get@https://10.10.10.20/ckfinder/ckfinder.js:9:25720
CKFinder</<._setup/</t.load@https://10.10.10.20/ckfinder/ckfinder.js:9:24631
newContext/C.prototype.callPlugin/<@https://10.10.10.20/ckfinder/ckfinder.js:5:22740
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
u@https://10.10.10.20/ckfinder/ckfinder.js:5:17104
newContext/C.prototype.callPlugin@https://10.10.10.20/ckfinder/ckfinder.js:5:21493
newContext/C.prototype.fetch@https://10.10.10.20/ckfinder/ckfinder.js:5:20194
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:21399
newContext/C.prototype.enable@https://10.10.10.20/ckfinder/ckfinder.js:5:23528
newContext/y.enable@https://10.10.10.20/ckfinder/ckfinder.js:5:26027
newContext/C.prototype.enable/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23388
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
each@https://10.10.10.20/ckfinder/ckfinder.js:5:14253
newContext/C.prototype.enable@https://10.10.10.20/ckfinder/ckfinder.js:5:22878
newContext/C.prototype.init@https://10.10.10.20/ckfinder/ckfinder.js:5:19790
o/<@https://10.10.10.20/ckfinder/ckfinder.js:5:25339
setTimeout handler*CKFinder</<._setup/</</req.nextTick<@https://10.10.10.20/ckfinder/ckfinder.js:5:29067
o@https://10.10.10.20/ckfinder/ckfinder.js:5:25278
CKFinder</<._setup/</</requirejs@https://10.10.10.20/ckfinder/ckfinder.js:5:28955
i@https://10.10.10.20/ckfinder/ckfinder.js:7:27411
CKFinder</<._setup/</r.init@https://10.10.10.20/ckfinder/ckfinder.js:7:27819
CKFinder</<._setup/</<.start@https://10.10.10.20/ckfinder/ckfinder.js:19:9399
o/<@https://10.10.10.20/ckfinder/ckfinder.js:19:12310
newContext/y.execCb@https://10.10.10.20/ckfinder/ckfinder.js:5:26980
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:20584
newContext/C.prototype.enable/</<@https://10.10.10.20/ckfinder/ckfinder.js:5:23189
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
newContext/C.prototype.emit/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23667
each@https://10.10.10.20/ckfinder/ckfinder.js:5:14253
newContext/C.prototype.emit@https://10.10.10.20/ckfinder/ckfinder.js:5:23635
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:21305
newContext/C.prototype.enable/</<@https://10.10.10.20/ckfinder/ckfinder.js:5:23189
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
newContext/C.prototype.emit/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23667
each@https://10.10.10.20/ckfinder/ckfinder.js:5:14253
newContext/C.prototype.emit@https://10.10.10.20/ckfinder/ckfinder.js:5:23635
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:21305
newContext/C.prototype.enable/</<@https://10.10.10.20/ckfinder/ckfinder.js:5:23189
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
newContext/C.prototype.emit/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23667
each@https://10.10.10.20/ckfinder/ckfinder.js:5:14253
newContext/C.prototype.emit@https://10.10.10.20/ckfinder/ckfinder.js:5:23635
newContext/C.prototype.check@https://10.10.10.20/ckfinder/ckfinder.js:5:21305
newContext/C.prototype.enable/</<@https://10.10.10.20/ckfinder/ckfinder.js:5:23189
bind/<@https://10.10.10.20/ckfinder/ckfinder.js:5:14778
newContext/C.prototype.emit/<@https://10.10.10.20/ckfinder/ckfinder.js:5:23667

1 个答案:

答案 0 :(得分:6)

目前问题在于CKFinder使用的库 - jQuery mobile isn't properly initialized when its frame is located inside a hidden <div>style="display:none")。

要解决此问题,您可以尝试通过为<div>设置零高度并将overflow设置为hidden来隐藏CKFinder应用程序。

<div id="ckfinder" style="height:0;overflow: hidden;"></div>

<button id="show">show CKFinder</button>

<script>
    document.getElementById('show' ).onclick = function(){
        document.getElementById('ckfinder' ).style.height = 'auto';
    };

    CKFinder.widget( 'ckfinder', {
        width: '100%',
        height: 600
    } );

</script>