adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.29k stars 7.66k forks source link

Problem with JavaScript string #6827

Open FezVrasta opened 10 years ago

FezVrasta commented 10 years ago

I was code-golfing when I've found a bug in Brackets.

Maximize your Brackets and set the sidebar to the width of the screenshot below (probably you need a 1920x1080px screen as well). Write this string in a document:

i=-1,s=85,t=20;(function r(){if(++i<7){document.write('<b style=position:absolute;width:80px;text-align:center;font-size:'+s+'px;top:'+t+'px;color:'+['f00','f90','cf0','3f0','0ff','06f','c0f'][i]+'>∩</b>');setTimeout(r,999);s-=5;t+=5}})()

Then try to select the entire string: the selected text will stop at t+.

image

It doesn't happens if the document area is more narrow or larger.

Okay this bug happens only in this very edge case but it's still a bug I guess...

dangoor commented 10 years ago

Reviewed low priority to @RaymondLim