0

Combobox need Two Tabkeys in IE7

asked 2010-08-27 05:01:54 +0800

RFSLUX gravatar image RFSLUX
75

Hi All,

with zk3.6.x our app worked fine, now with zk5.03 i've a little prob with the combobox and IE7.
When I set ItemIndex of Combobox i need two keypresses of <TAB> to left the Combobox to next control.

Snippet to reproduce:

Pojo:

package lu.repondo.common.pojo;

public class Currency {
	Integer currencyid = new Integer(-1);
	String iso4217 = "";
	
	public Integer getCurrencyid() {
		return currencyid;
	}
	public void setCurrencyid(Integer currencyid) {
		this.currencyid = currencyid;
	}
	public String getIso4217() {
		return iso4217;
	}
	public void setIso4217(String iso4217) {
		this.iso4217 = iso4217;
	}
}

ZUL:

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<zscript language="Java"><![CDATA[                               
	import lu.repondo.common.pojo.Currency;
	
	List waehrungen = new ArrayList();
	Currency c= new Currency();
	c.setCurrencyid(new Integer(1));
	c.setIso4217("EUR");
	waehrungen.add(c);
	
	c= new Currency();
	c.setCurrencyid(new Integer(2));
	c.setIso4217("USD");
	waehrungen.add(c);
]]>
</zscript>

<window title="new page title" border="normal">
	<label value="insert 1 or 2: " />
	<textbox id="a" onBlur="setCombo()"/>
	<textbox id="b" />
	<combobox width="116px" id="cmbCurrency" mold="rounded" >
		<comboitem forEach="${waehrungen}" label="${each.iso4217}" value="${each.currencyid}"/>
	</combobox>	
	<textbox id="c" />

<zscript language="Java"><![CDATA[                               
	public void setCombo(){
  			Integer nWaehrung = new Integer(a.getText());
  			for(int i=0;i<cmbCurrency.getItemCount();i++){
  				Integer nKey = (Integer)cmbCurrency.getItemAtIndex(i).getValue();  				
  				if (nKey.intValue() == nWaehrung.intValue()  ){
  					cmbCurrency.setSelectedIndex(i);
  					break;
  				}
  			}		
  	}
	
	a.setFocus(true);	
]]>
</zscript>
</window>
</zk>

Insert 1 or 2 and move through the controls via <TAB>-Key

In ie7 (no other versions testet at the moment) you need two keypress of <TAB> to move from combo
to textbox "c". In Firefox 3.6 only one keypress of <TAB> is needed, so in Firefox the code works fine for me.
Any idea how to fix it for IE ??

Best regards
Jörg

delete flag offensive retag edit

3 Replies

Sort by » oldest newest

answered 2010-08-31 03:08:41 +0800

RFSLUX gravatar image RFSLUX
75

Upd.
IE8 shows same characteristics.

Every time, I set the Combobox with setSelectIndex() to a differnet value. IE need two keypress of tab to leave after getting focus.
If the Combobox gets focus second time only one keypress of tab is needed to leave the box.

A Bug ?

Best regards
Jörg

link publish delete flag offensive edit

answered 2010-09-02 02:21:59 +0800

PeterKuo gravatar image PeterKuo
481 2

Yes, it's a bug.
Please report it and let us track it.
I can reproduce the case.

link publish delete flag offensive edit

answered 2010-09-02 02:53:08 +0800

RFSLUX gravatar image RFSLUX
75

Th@nx PeterKuo,

Bug is reported under:
Bug report

Best regards,
Jörg

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-08-27 05:01:54 +0800

Seen: 274 times

Last updated: Sep 02 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More