Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundling issues #5

Open
leblancmeneses opened this issue Jun 15, 2014 · 8 comments
Open

bundling issues #5

leblancmeneses opened this issue Jun 15, 2014 · 8 comments

Comments

@leblancmeneses
Copy link

this nuget package currently causes problem with the mvc bundler

ckeditor/ckeditor4-releases#11

"run-time error JS1019: Can't have 'break' outside of loop: break a"

i consolidate all my scripts into 1... cannot do this right now due to ckeditor.js

@mdevilliers
Copy link
Owner

Hey,

I see you have also raised the same issue at the ckeditor repository - ckeditor/ckeditor4-releases#11 (comment) which is cool.

I just take the output of that project and wrap it in a nuget library so one they have sorted it out I'll rewrap the package.

I'll keep this issue going until the other one is resolved

Thanks

Mark

@wwalc
Copy link

wwalc commented Jun 24, 2014

Is there any way in which we can help in debugging this issue? I've seen the ticket with source maps, but we still haven't decided what to do there.

I'd debug it by myself, but I haven't used mvc bundler before.

Here's an unminified package of CKEditor, I hope it will make the debugging process easier:
http://ckeditor.com/tmp/ckeditor_4.4.2_standard_unminified.tar.gz

You can build it by yourself in the future with:

    $ git clone https://github.com/ckeditor/ckeditor-presets.git
    $ cd ckeditor-presets
    $ git submodule init
    $ git submodule update
    $ ./build.sh standard --leave-js-unminified
    // OR include all plugins
    $ ./build.sh standard all --leave-js-unminified

The release will be created in the "build" folder. Once you find the invalid line, just report it @ http://dev.ckeditor.com

@leblancmeneses
Copy link
Author

Our working workaround:
We ended up writing an IBundleTransform, ItemTransform that would skip .min files. It just concats the min directly to the output stream. This will work moving forward.

@wwalc
Copy link

wwalc commented Jun 24, 2014

Alright, so if anyone else encounters

run-time error JS1019: Can't have 'break' outside of loop: break a

and is willing to help in resolving this issue, then please use the unminified version of CKEditor and report what code exactly is causing it. Check the error console and paste a couple of relevant lines from ckeditor.js so that we could locate it (a line number may not help).

@alekskuc
Copy link

alekskuc commented Jul 27, 2016

CKEDITOR.dom.selection.prototype = {
(...)
selectRanges: function(a) {
(...)
} else {
var g;
a: {
var i, j;
if (a.length == 1 && !(j = a[0]).collapsed && (g = j.getEnclosedNode()) && g.type == CKEDITOR.NODE_ELEMENT) {
j = j.clone();
j.shrink(CKEDITOR.SHRINK_ELEMENT, true);
if ((i = j.getEnclosedNode()) && i.type == CKEDITOR.NODE_ELEMENT)
g = i;
if (g.getAttribute("contenteditable") == "false")
************** NO LOOP HERE ************** break a
}
g = void 0
}

And no loop here:

CKEDITOR.dom.selection.prototype = {
(...)
selectRanges: function(a) {
(...)
} else {
var g;
a: {
var i, j;
if (a.length == 1 && !(j = a[0]).collapsed && (g = j.getEnclosedNode()) && g.type == CKEDITOR.NODE_ELEMENT) {
j = j.clone();
j.shrink(CKEDITOR.SHRINK_ELEMENT, true);
if ((i = j.getEnclosedNode()) && i.type == CKEDITOR.NODE_ELEMENT) g = i;
if (g.getAttribute("contenteditable") == "false")
/** ** ** ** ** ** ** NO LOOP HERE ** ** ** ** ** ** **/
break a
}
g = void 0
}

@mdevilliers
Copy link
Owner

@wwalc @vokiel

Looks like you have got some feedback!

@mdevilliers mdevilliers reopened this Jul 27, 2016
@BLITZandKILL
Copy link

BLITZandKILL commented Apr 26, 2017

Did anyone happen to find a solution to this issue? I have tried replacing the breaks with a return false but this breaks the code.

P.S. I am trying to use CKEditor 4 with an ASP.NET Core project.

@mdevilliers
Copy link
Owner

@wwalc @vokiel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants