0

Combobox autodropdown on page reload issue with IE

asked 2020-02-11 19:50:43 +0800

AlexOverD gravatar image AlexOverD
101

After migrating from ZK version 8.5.0 to 8.6.0.1, we faced the issue with Combobox elements only in IE browser. By some reason, it can't be re-created in ZK fiddle, so let me just paste my small demo code here to be clear. Simple ZUL with combobox element:

<zk>
    <div apply="org.zkoss.bind.BindComposer" height="278px" width="443px"
         viewModel="@id('vm') @init('com.swissre.cre.presentation.mvc.TestModel')">
        <combobox id="cmbColor" width="150px"
                  model="@load(vm.names)" selectedItem="@bind(vm.iname)">
        </combobox>
    </div>
</zk>

My test model:

public class TestModel {

    private String iname;
    private List<String> names = Arrays.asList("Iüvanov", "alex", "ivan");

    @Init
    public void init() {
        setIname("Iüvanov");
    }

    public List<String> getNames() {
        return names;
    }

    public void setNames(List<String> names) {
        this.names = names;
    }

    public String getIname() {
        return iname;
    }

    public void setIname(String iname) {
        this.iname = iname;
    }

}

If the selected value contains characters like this "ü" (or any other diaeresis characters), the dropdown will be triggered on page re-load (on F5 for instance). If you remove this char from collection element it will not happen. Maybe someone can help me to fix this issue for IE? Thank you in advance.

delete flag offensive retag edit

5 Answers

Sort by » oldest newest most voted
0

answered 2020-02-12 15:39:55 +0800

cor3000 gravatar image cor3000
6280 2 7

If the problem doesn't happen on ZK fiddle (assuming you picked the correct version) then, there could be a configuration issue with character encoding in your environment.

Also your explanation

the dropdown will be triggered on page re-load

isn't fully clear. (trigger=open? on the same page or new reloaded page? does it prevent reloading he page?). I'll increase your karma, so that you can post a screenshot describing what you mean.

Also in this case the raw page response might give additional hints especially if character encoding is involved or not. Comparing a working and non working page may just give the missing hint to start some dedicated debugging.

link publish delete flag offensive edit
0

answered 2020-02-12 17:47:11 +0800

AlexOverD gravatar image AlexOverD
101

Thank you for your reply.

Sorry for confusing. "trigger=open?" - yes, it opens aoutomaticaly on page re-load.

I'll increase your karma, so that you can post a screenshot describing what you mean. - It will be hard to explain with single screenshot. Maybe you can fallow this link?

https://github.com/zkoss/zk/issues/1874

I posted a .gif with the issue there.

Here is the picture with comparing two HTML result pages: image description

link publish delete flag offensive edit
0

answered 2020-02-13 11:18:13 +0800

cor3000 gravatar image cor3000
6280 2 7

updated 2020-02-13 11:19:16 +0800

thanks for the screenshot:

at least it shows 1 maybe relevant difference between your code and anything we can test, or zkfiddle.

image description

Your combobox is using a custom client side widget class crew.inp.CrewCombobox That's something we can't test without the custom JS code. Can you please try disabling the widget customization to see whether the default implementation zul.inp.Combobox has the same error. (disabling component customization is usually done in a lang-addon.xml inside your project. There you should find a component definition for combobox defining a custom widget-class).

If it works as during our tests, then you'll have to debug your custom widget class. Or contact our support in case you can't share the custom code in public.

link publish delete flag offensive edit
0

answered 2020-02-17 17:17:57 +0800

AlexOverD gravatar image AlexOverD
101

Thank you for your answer.

I've found the overriding component in lang-addon.xml

I was completely sure that I'm using native ZK element. I'll try to find out if this is due our ovirreded methods in combobox.

I'm a new guy in ZK :) Sorry.

link publish delete flag offensive edit

Comments

no need to be "sorry", that's not obvious especially for someone new to ZK, so welcome to this forum, I'll keep watching this thread

cor3000 ( 2020-02-19 10:21:30 +0800 )edit
0

answered 2020-03-03 21:37:32 +0800

AlexOverD gravatar image AlexOverD
101

Hello,

Still no luck with this problem. This is true, we use our own CrewDropdown element with some additional functional and style, but I couldn't find any code which might affect the element.

I've found old IE10/IE11 bug - https://answers.microsoft.com/en-us/ie/forum/all/ie-10-11-input-elements-with-unicode-entity/de997de8-3e94-44b8-b7e3-c5291a87c920 And fix for it from ZK developers - https://tracker.zkoss.org/browse/ZK-3183 This is exactly my case, but I have no idea why this fix has stop working in 8.6.0.1 but worked in 8.5.0.

Best Regards.

link publish delete flag offensive edit

Comments

there's rarely luck involved, instead this requires to drill down the error source. So I have to ask again: Does this problem happen when using a standard Combobox and not your custom implementation?

cor3000 ( 2020-03-04 10:00:49 +0800 )edit

the code fixing the issue ZK-3183 is still in place, even in 8.6.0.1 https://github.com/zkoss/zk/blob/v8.6.0.1/zul/src/archive/web/js/zul/inp/InputWidget.js#L827-L835

cor3000 ( 2020-03-04 10:01:22 +0800 )edit
Your answer
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
1 follower

RSS

Stats

Asked: 2020-02-11 19:50:43 +0800

Seen: 17 times

Last updated: Mar 03 '20

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