Medium.js icon indicating copy to clipboard operation
Medium.js copied to clipboard

Chrome freeze with cpu 100%

Open ghost opened this issue 10 years ago • 9 comments

When entering Shift+Return to make a br in partial or rich mode on docs page, my chrome(mac) 37.0.2062.120 freezed and the cpu is run at 100%。

ghost avatar Sep 13 '14 00:09 ghost

I've run into same issue. Noticed when I'm using option tags: null freezing not happening. Google Chrome 35

evilive3000 avatar Sep 13 '14 09:09 evilive3000

I'll take a look at this today. On Sep 13, 2014 5:30 AM, "evilive" [email protected] wrote:

I've run into same issue. Noticed when I'm using option tags: null freezing not happened. Google Chrome 35

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/89#issuecomment-55486688.

robertleeplummerjr avatar Sep 13 '14 10:09 robertleeplummerjr

What version? On Sep 13, 2014 6:34 AM, "Robert Plummer" [email protected] wrote:

I'll take a look at this today. On Sep 13, 2014 5:30 AM, "evilive" [email protected] wrote:

I've run into same issue. Noticed when I'm using option tags: null freezing not happened. Google Chrome 35

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/89#issuecomment-55486688.

robertleeplummerjr avatar Sep 13 '14 10:09 robertleeplummerjr

was 35 (beta). Now updated to Version 38.0.2125.58 beta (64-bit) OS: debian

evilive3000 avatar Sep 13 '14 11:09 evilive3000

And Medium.js? On Sep 13, 2014 7:02 AM, "evilive" [email protected] wrote:

was 35 (beta). Now updated to Version 38.0.2125.58 beta (64-bit)

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/89#issuecomment-55489625.

robertleeplummerjr avatar Sep 13 '14 11:09 robertleeplummerjr

http://codepen.io/anon/pen/DjoFk and even here http://jakiestfu.github.io/Medium.js/docs/ at inline, partial and rich examples

evilive3000 avatar Sep 13 '14 11:09 evilive3000

I have the same issue. It seems to get stuck traversing children. It arrives at the BR tag which seems to be handled in a special case where it adds an element (child.parentNode.insertBefore(text, child);). In the outer traverseAll, it then handles the same BR tag and keeps looping. If you comment out that line, it won't loop but it will delete the BR tag. I don't know how to fix it.

Edit: actually just putting a "break;" after "case 'BR':" seems to fix it. You can use BR and it won't loop, but I don't know what the code there was supposed to do

Sequa avatar Sep 24 '14 08:09 Sequa

Nice find!

On Wed, Sep 24, 2014 at 4:46 AM, Sequa [email protected] wrote:

I have the same issue. It seems to get stuck traversing children. It arrives at the BR tag which seems to be handled in a special case where it adds an element (child.parentNode.insertBefore(text, child);). In the outer traverseAll, it then handles the same BR tag and keeps looping. If you comment out that line, it won't loop but it will delete the BR tag. I don't know how to fix it.

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/89#issuecomment-56641436.

Robert Plummer

robertleeplummerjr avatar Sep 24 '14 13:09 robertleeplummerjr

Ok, I believe I have it fixed. I pushed to all branches, anyone care to double check?

On Wed, Sep 24, 2014 at 9:41 AM, Robert Plummer < [email protected]> wrote:

Nice find!

On Wed, Sep 24, 2014 at 4:46 AM, Sequa [email protected] wrote:

I have the same issue. It seems to get stuck traversing children. It arrives at the BR tag which seems to be handled in a special case where it adds an element (child.parentNode.insertBefore(text, child);). In the outer traverseAll, it then handles the same BR tag and keeps looping. If you comment out that line, it won't loop but it will delete the BR tag. I don't know how to fix it.

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Medium.js/issues/89#issuecomment-56641436.

Robert Plummer

Robert Plummer

robertleeplummerjr avatar Sep 24 '14 14:09 robertleeplummerjr