ICEfaces
  1. ICEfaces
  2. ICE-3534

SelectInputText component gives a Javascript error after typing a character

    Details

      Description

      Component Showcase can be used to reproduce the error.

      There is a JavaScript error as soon as I type a character in the input text.

      Error is "form is not defined". I got this error message from Firebug. Firebug says that error comes from "onkeypress(keypress charCode=97, keyCode=0), iceSubmit(form, this, event);"

      But the autocomplete list comes for the typed character.

      In Firefox, the focus is lost when I type another character.

      In Internet Explorer, the focus goes to the beginning of the text.

      In Safari, the focus goes to input text and the text is selected. After that the list disappears.

        Issue Links

          Activity

          Hide
          Isuru Perera added a comment -

          The onkeypress attribute for div is not the only problem, there is something wrong with the focus management also...

          Show
          Isuru Perera added a comment - The onkeypress attribute for div is not the only problem, there is something wrong with the focus management also...
          Hide
          Mandeep Hayher added a comment -

          All issues are reproducible on ICEFaces trunk revision# 17590.

          Show
          Mandeep Hayher added a comment - All issues are reproducible on ICEFaces trunk revision# 17590.
          Hide
          Adnan Durrani added a comment -

          There were two issue listed by the Isuru Perera:
          1- Unnecessary rendering of "onKeypress" handler ( which was causing the javascript error)
          I wasn't be able to get this javascript error, but I could see the onkeypress rendering. So I fixed that problem. I have also matched it with the previous version.

          2- Focus problem. During the input the seletInputText was loosing the focus.
          I have fixed that problem as well.

          Isuru thanks for finding the problem. Can you please verify, if the problem has fixed.

          trunk revision: 17607

          Show
          Adnan Durrani added a comment - There were two issue listed by the Isuru Perera: 1- Unnecessary rendering of "onKeypress" handler ( which was causing the javascript error) I wasn't be able to get this javascript error, but I could see the onkeypress rendering. So I fixed that problem. I have also matched it with the previous version. 2- Focus problem. During the input the seletInputText was loosing the focus. I have fixed that problem as well. Isuru thanks for finding the problem. Can you please verify, if the problem has fixed. trunk revision: 17607
          Hide
          Isuru Perera added a comment -

          Hi Adnan,

          You are welcome, and thanks for fixing the issue.

          I tested the component showcase again. Revision number is 17607

          Autocomplete is working well in Firefox 3.0.1. But the problem still exists for Internet Explorer 7 and Safari.

          The onkeypress is now not rendered for "div".

          In Internet Explorer, the focus goes to the beginning of the text.

          In Safari, the focus goes to input text and the text is selected. After that the list disappears.

          I couldn't test for Opera and IE6 as I don't have those browsers in my PC.

          Did you test the fix with all browsers? Please let me know the details.

          Show
          Isuru Perera added a comment - Hi Adnan, You are welcome, and thanks for fixing the issue. I tested the component showcase again. Revision number is 17607 Autocomplete is working well in Firefox 3.0.1. But the problem still exists for Internet Explorer 7 and Safari. The onkeypress is now not rendered for "div". In Internet Explorer, the focus goes to the beginning of the text. In Safari, the focus goes to input text and the text is selected. After that the list disappears. I couldn't test for Opera and IE6 as I don't have those browsers in my PC. Did you test the fix with all browsers? Please let me know the details.
          Hide
          Isuru Perera added a comment -

          I checked why Autocomplete is not working properly in 1.7.2

          It was working well in ICEfaces 1.7.1 and I compared the ICEfaces 1.7.1 sources with latest sources.

          I have the sources with revision 17622.

          I thought that the problem is with JavaScript, and I checked the modified JavaScript files in the 1.7.2 trunk.

          I saw that there is a change for "element.js" inside "bridge\lib". Latest change for that file is done by "mircea.toma" on August 19, 2008. Revision number is 17365. The comment says "ICE-3335 Simplify how 'input' elements are updated."

          Then I updated the "element.js" inside "bridge\lib" to revision 17022, which is the revision number for previous change.

          Adnan Durrani has changed the "autocomplete_ext.js" inside "bridge\lib\extras". I updated that file to revision 16338. Since that change is not needed as I know.

          After these changes, Autocomplete is working well in all browsers...

          So, I think the fix for http://jira.icefaces.org/browse/ICE-3335 has caused the problem for SelectInputText. Please check that..

          Show
          Isuru Perera added a comment - I checked why Autocomplete is not working properly in 1.7.2 It was working well in ICEfaces 1.7.1 and I compared the ICEfaces 1.7.1 sources with latest sources. I have the sources with revision 17622. I thought that the problem is with JavaScript, and I checked the modified JavaScript files in the 1.7.2 trunk. I saw that there is a change for "element.js" inside "bridge\lib". Latest change for that file is done by "mircea.toma" on August 19, 2008. Revision number is 17365. The comment says " ICE-3335 Simplify how 'input' elements are updated." Then I updated the "element.js" inside "bridge\lib" to revision 17022, which is the revision number for previous change. Adnan Durrani has changed the "autocomplete_ext.js" inside "bridge\lib\extras". I updated that file to revision 16338. Since that change is not needed as I know. After these changes, Autocomplete is working well in all browsers... So, I think the fix for http://jira.icefaces.org/browse/ICE-3335 has caused the problem for SelectInputText. Please check that..

            People

            • Assignee:
              Unassigned
              Reporter:
              Isuru Perera
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: