0

When using CKFinder 3.2.0 on Firefox 44.0 I receive the following error. It happens only on Firefox and on Chrome is completely fine.

Any idea what could cause it and how to fix it?

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
Marek Lewandowski
  • 3,291
  • 1
  • 20
  • 26
GibboK
  • 71,848
  • 143
  • 435
  • 658
  • 1
    AFAIR this event is from jQuery mobile so maybe there was some problems with loading jquery mobile's js file. Also in which mode did you encounter that (widget, popup, modal)? – jodator Feb 12 '16 at 07:59
  • @jodator thanks for your comment, I am using widget mode. I have notice jQuery mobile is included inside lib in ckFinder.... any idea or work around how to fix it? – GibboK Feb 12 '16 at 08:01
  • 1
    I've tried to reproduce this on my machine using HTPS and/or slower connections but I was unable to reproduce it on dev version (3.3) nor on https://cksource.com/ckfinder/demo#widget site (version 3.2). Thus you should check in dev console (F12) - network tab - if jquery mobile file is loaded during start (no 404 errors, etc). It should be available at: https://1010.10.20/ckfinder/libs/jquery.mobile.js judging on that stack trace. – jodator Feb 12 '16 at 08:53
  • I've double check this, on HTPS and HTP, same error, we are evaluating ckfinder within a dojo 1.10 application. Are you aware of any issue with Dojo? Any other idea where to investigate this issue? Thanks for your support! – GibboK Feb 12 '16 at 13:30
  • 1
    I have found out that the error appears when we try to initialized ckfinder widget inside a div which has inline style property display:none – GibboK Feb 15 '16 at 14:39
  • Ugh.. I can reproduce this but I cannot tell you why Firefox does it right now. I've submitted bug report for this: https://github.com/ckfinder/ckfinder/issues/294. As for now the only solution is to initialize CKFinder when it is needed in visible div as this happen only in Firefox. – jodator Feb 16 '16 at 09:58
  • 1
    I've also reported a bug for jQuery mobile: https://github.com/jquery/jquery-mobile/issues/8383 since similar issue is reproducible on pure jQuery mobile app. – jodator Feb 16 '16 at 10:47

1 Answers1

5

As for now the problem resides in the library that is used by CKFinder - jQuery mobile isn't properly initialized when its frame is located inside a hidden <div> (with style="display:none").

To overcome this issue you can try another approach to hide the CKFinder application by setting zero height for you <div> and setting overflow to hidden.

<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>
Anna Tomanek
  • 2,219
  • 16
  • 23
jodator
  • 2,445
  • 16
  • 29