-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hai below is my code
This is in window _Main
<codemirror id="remarks" syntax="sql" width="300px" height="300px" />
I have another window window_Child
one button event in Window_main invokes window_Child .In child window i am setting visible false if main window and when i ma closing child window i am setting visibility true for main window
issue 1:
After closing child window .In main window the code mirror field going into disable mode and even value in that also not visible .but value existed in that filed .If i press F12 suddenly it is coming into correct mode .I am sure my code not disabling any where .Why it is happening in only Firefox.My ZK version is 5.0.5
issue 2:
I have to check for is Data changed always but for new form Code mirror value is assigning "\n" instead of empty string " " .How can i control that
I download zk-codemirror from http://code.google.com/p/zk-codemirror/
Then, I write a sample:
<zk> <window id="main" title="main win" border="normal" width="500px" height="400px"> <codemirror id="code" width="400px" height="200px" syntax="sql"> <attribute name="value"><![CDATA[select * from users where name = "test";]]></attribute> </codemirror> <separator /> <button label="change" onClick="main.setVisible(false); child.setVisible(true);" /> </window> <separator /> <window id="child" title="child win" border="normal" width="500px" height="400px" closable="true" visible="false" onClose="main.setVisible(true);"> <label>Child Window</label> </window> </zk>
I run this code on ZK 5.0.5 and using Firefox 11. But it works fine.
Maybe you can post a issue for the zk-codemirror author here:
http://code.google.com/p/zk-codemirror/issues/list
T hank you paowang execute my below code and tell me is it code mirror issue or grid issue (Only in fire fox)
Steps : 1. Enter some Data in two Code mirror components .
2.Focus on second tab and then focus on first tab .
now you can see that data in remarks code mirror is not visible and it goes to disable mode .just re size the browser then you can find out remarks filed is editable and data also visible .Where is the issue can you confirm me.
<zk>
<tabbox>
<tabs>
<tab label="Tab 1" height="100%" />
<tab id="instructionsTab" label="Tab 2" />
</tabs>
<tabpanels>
<tabpanel style="overflow:auto">
<panel border="none">
<panelchildren>
<groupbox mold="3d">
<grid sclass="GridLayoutNoBorder"
fixedLayout="true" style="border:0px">
<columns>
<column width="15%" />
<column width="35%" />
</columns>
<rows>
<row visible="true"
id="row_queryData">
<label value="code" />
<hbox>
<space spacing="2px" />
<codemirror syntax="sql" />
</hbox>
</row>
<row>
<label value="remarks" />
<hbox>
<space spacing="2px" />
<codemirror syntax="sql" />
</hbox>
</row>
</rows>
</grid>
</groupbox>
</panelchildren>
</panel>
</tabpanel>
<tabpanel></tabpanel>
</tabpanels>
</tabbox>
</zk>
T hank you paowang execute my below code and tell me is it code mirror issue or grid issue (Only in fire fox)
Steps : 1. Enter some Data in two Code mirror components .
2.Focus on second tab and then focus on first tab .
now you can see that data in remarks code mirror is not visible and it goes to disable mode .just re size the browser then you can find out remarks filed is editable and data also visible .Where is the issue can you confirm me.
<zk>
<tabbox>
<tabs>
<tab label="Tab 1" height="100%" />
<tab id="instructionsTab" label="Tab 2" />
</tabs>
<tabpanels>
<tabpanel style="overflow:auto">
<panel border="none">
<panelchildren>
<groupbox mold="3d">
<grid sclass="GridLayoutNoBorder"
fixedLayout="true" style="border:0px">
<columns>
<column width="15%" />
<column width="35%" />
</columns>
<rows>
<row visible="true"
id="row_queryData">
<label value="code" />
<hbox>
<space spacing="2px" />
<codemirror syntax="sql" />
</hbox>
</row>
<row>
<label value="remarks" />
<hbox>
<space spacing="2px" />
<codemirror syntax="sql" />
</hbox>
</row>
</rows>
</grid>
</groupbox>
</panelchildren>
</panel>
</tabpanel>
<tabpanel></tabpanel>
</tabpanels>
</tabbox>
</zk>
I write a pure html to reproduce this issue:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="codemirror.js" type="text/javascript"></script> <title>issue of codemirror</title> </head> <body> <div> <button onClick="document.getElementById('content').style.display = 'none';">close</button> <button onClick="document.getElementById('content').style.display = 'block';">open</button> </div> <br></br> <div id="content"> <div style="border: 1px solid gray;"> <textarea id="code" cols="120" rows="50">select * from code1;</textarea> </div> <br></br> <div style="border: 1px solid gray;"> <textarea id="code2" cols="120" rows="50">select * from code2;</textarea> </div> </div> <script type="text/javascript"> CodeMirror.fromTextArea('code', { height : "50px", parserfile : "parsesql.js", stylesheet : "sqlcolors.css", path : "./", textWrapping : false }); CodeMirror.fromTextArea('code2', { height : "50px", parserfile : "parsesql.js", stylesheet : "sqlcolors.css", path : "./", textWrapping : false }); </script> </body> </html>
The complete files is here: http://goo.gl/yX3AQ
The codemirror.js and other files in this html are fetched from zk-codemirror v1.0.1.
As your description, the second codemirror textarea of this pure html is incorrect in Firefox.
Asked: 2012-04-02 07:00:16 +0800
Seen: 484 times
Last updated: Apr 24 '12