Yesterday Tyron brought to my attention that the editors for Routines, Triggers and Events look quite bad now. I've tracked the issue down to the upgrade of codemirror to version 2.12 (before/after screenshot attached). And in particular these lines of code that were introduced in codemirror.js (lines 775-777):
--->%--- // Needed to prevent odd wrapping/hiding of widgets placed in here. code.style.width = ""; code.style.width = scroller.scrollWidth + "px"; --->%---
I'd like to comment these lines out, since I don't think that there is any other way of fixing the issue. Any objections?
Rouslan
On Fri, Aug 19, 2011 at 5:35 PM, Rouslan Placella rouslan@placella.com wrote:
Yesterday Tyron brought to my attention that the editors for Routines, Triggers and Events look quite bad now. I've tracked the issue down to the upgrade of codemirror to version 2.12 (before/after screenshot attached). And in particular these lines of code that were introduced in codemirror.js (lines 775-777):
--->%--- // Needed to prevent odd wrapping/hiding of widgets placed in here. code.style.width = ""; code.style.width = scroller.scrollWidth + "px"; --->%---
I'd like to comment these lines out, since I don't think that there is any other way of fixing the issue. Any objections?
Rouslan
Oh, that is awesome that you found the bug. I've had the same issues on my code before.
Do you know what the code snippet does actually? Maybe we should ask the original author first what it's for.
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On Fri, 2011-08-19 at 17:41 +0300, Tyron Madlener wrote:
On Fri, Aug 19, 2011 at 5:35 PM, Rouslan Placella rouslan@placella.com wrote:
Yesterday Tyron brought to my attention that the editors for Routines, Triggers and Events look quite bad now. I've tracked the issue down to the upgrade of codemirror to version 2.12 (before/after screenshot attached). And in particular these lines of code that were introduced in codemirror.js (lines 775-777):
--->%--- // Needed to prevent odd wrapping/hiding of widgets placed in here. code.style.width = ""; code.style.width = scroller.scrollWidth + "px"; --->%---
I'd like to comment these lines out, since I don't think that there is any other way of fixing the issue. Any objections?
Rouslan
Oh, that is awesome that you found the bug. I've had the same issues on my code before.
Well, that's half the story, actually. I have a small hack that is called right after codemirror is loaded to ensure that it doesn't expand beyond where it's supposed to:
--->%--- // Hack to prevent the codemirror from expanding beyond dialog boundries $('.CodeMirror-scroll').find('div').first().css('width', '1px'); --->%---
Do you know what the code snippet does actually? Maybe we should ask the original author first what it's for.
No idea, actually, I tried to git-blame codemirror's GIT repo to figure out when that code was introduced, but I didn't manage. I guess I didn't try hard enough. So, yeah, maybe it's a good idea to email codemirror's author. I'll do that later.
Rouslan
On Fri, Aug 19, 2011 at 5:51 PM, Rouslan Placella rouslan@placella.com wrote:
On Fri, 2011-08-19 at 17:41 +0300, Tyron Madlener wrote:
On Fri, Aug 19, 2011 at 5:35 PM, Rouslan Placella rouslan@placella.com wrote:
Yesterday Tyron brought to my attention that the editors for Routines, Triggers and Events look quite bad now. I've tracked the issue down to the upgrade of codemirror to version 2.12 (before/after screenshot attached). And in particular these lines of code that were introduced in codemirror.js (lines 775-777):
--->%--- // Needed to prevent odd wrapping/hiding of widgets placed in here. code.style.width = ""; code.style.width = scroller.scrollWidth + "px"; --->%---
I'd like to comment these lines out, since I don't think that there is any other way of fixing the issue. Any objections?
Rouslan
Oh, that is awesome that you found the bug. I've had the same issues on my code before.
Well, that's half the story, actually. I have a small hack that is called right after codemirror is loaded to ensure that it doesn't expand beyond where it's supposed to:
--->%--- // Hack to prevent the codemirror from expanding beyond dialog boundries $('.CodeMirror-scroll').find('div').first().css('width', '1px'); --->%---
Do you know what the code snippet does actually? Maybe we should ask the original author first what it's for.
No idea, actually, I tried to git-blame codemirror's GIT repo to figure out when that code was introduced, but I didn't manage. I guess I didn't try hard enough. So, yeah, maybe it's a good idea to email codemirror's author. I'll do that later.
There's a google group for codemirror. The author is fairly active there: http://groups.google.com/group/codemirror
Rouslan
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On Fri, 2011-08-19 at 19:12 +0300, Tyron Madlener wrote:
On Fri, Aug 19, 2011 at 5:51 PM, Rouslan Placella rouslan@placella.com wrote:
On Fri, 2011-08-19 at 17:41 +0300, Tyron Madlener wrote:
On Fri, Aug 19, 2011 at 5:35 PM, Rouslan Placella rouslan@placella.com wrote:
Yesterday Tyron brought to my attention that the editors for Routines, Triggers and Events look quite bad now. I've tracked the issue down to the upgrade of codemirror to version 2.12 (before/after screenshot attached). And in particular these lines of code that were introduced in codemirror.js (lines 775-777):
--->%--- // Needed to prevent odd wrapping/hiding of widgets placed in here. code.style.width = ""; code.style.width = scroller.scrollWidth + "px"; --->%---
I'd like to comment these lines out, since I don't think that there is any other way of fixing the issue. Any objections?
Rouslan
Oh, that is awesome that you found the bug. I've had the same issues on my code before.
Well, that's half the story, actually. I have a small hack that is called right after codemirror is loaded to ensure that it doesn't expand beyond where it's supposed to:
--->%--- // Hack to prevent the codemirror from expanding beyond dialog boundries $('.CodeMirror-scroll').find('div').first().css('width', '1px'); --->%---
Do you know what the code snippet does actually? Maybe we should ask the original author first what it's for.
No idea, actually, I tried to git-blame codemirror's GIT repo to figure out when that code was introduced, but I didn't manage. I guess I didn't try hard enough. So, yeah, maybe it's a good idea to email codemirror's author. I'll do that later.
There's a google group for codemirror. The author is fairly active there: http://groups.google.com/group/codemirror
Some guy from the codemirror mailing list found a solution to this problem. It was setting the css property "table-layout" to "fixed" in the table that wraps the codemirror editor. Fixed in git.
@Tyron: not sure if this is relevant to the issue that you were experiencing.
Rouslan