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

标签 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

最佳答案

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

要解决此问题,您可以尝试另一种方法来隐藏 CKFinder 应用程序,即为您设置零高度 <div>和设置overflowhidden .

<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>

关于javascript - CKFinder TypeError : t. event.special.swipe 未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35357272/

相关文章:

javascript - XML ActiveXObject IE。对象不支持此操作

javascript - "Add to cart"与 jQuery

javascript - 同步两个 HTTP 请求

android - 无法从 Assets 路径在 phonegap 项目中使用 jquery 加载 xml 文件

android - Flurry + PhoneGap 3.1.0 使用 github.com/jfpsf/flurry-phonegap-plugin

javascript - 如何从 JavaScript 向 Rails 发送带参数的 http 请求

javascript - 获取未解析的元素内容

javascript - 返回前用变量填充 JavaScript 数组

javascript - Bootstrap typeahead 中的多项选择

java - 分页和排序