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

          Isuru Perera created issue -
          Hide
          Isuru Perera added a comment -

          Firefox 3.0.1 with Firebug showing the JavaScript error

          Show
          Isuru Perera added a comment - Firefox 3.0.1 with Firebug showing the JavaScript error
          Isuru Perera made changes -
          Field Original Value New Value
          Attachment screenshot-1.jpg [ 11246 ]
          Hide
          Isuru Perera added a comment -
          Show
          Isuru Perera added a comment - Please see my comment: http://www.icefaces.org/JForum/posts/list/9778.page#40616
          Mark Collette made changes -
          Link This issue depends on ICE-3321 [ ICE-3321 ]
          Mark Collette made changes -
          Fix Version/s 1.7.2 [ 10130 ]
          Assignee Adnan Durrani [ adnan.durrani ]
          Hide
          Mark Collette added a comment -

          Fixing ICE-3321 should just fix this.

          Show
          Mark Collette added a comment - Fixing ICE-3321 should just fix this.
          Hide
          Ken Fyten added a comment -

          We can't wait for ICE-3321 as it's targeted for 1.8DR#1, and we need this fixed for 1.7.2.

          Show
          Ken Fyten added a comment - We can't wait for ICE-3321 as it's targeted for 1.8DR#1, and we need this fixed for 1.7.2.
          Ken Fyten made changes -
          Assignee Priority P1
          Hide
          Adnan Durrani added a comment -

          I tested the component-showcase with the head, and didn't see any error, not even in firebug. Mandeep can you please verify this case?

          Show
          Adnan Durrani added a comment - I tested the component-showcase with the head, and didn't see any error, not even in firebug. Mandeep can you please verify this case?
          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.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17607 Wed Sep 17 22:47:02 MDT 2008 adnan.durrani Fix for ICE-3534 (SelectInputText component gives a Javascript error after typing a character)
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputtext/SelectInputText.java
          Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/autocomplete_ext.js
          Adnan Durrani made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          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
          Adnan Durrani made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          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.
          Ken Fyten made changes -
          Assignee Adnan Durrani [ adnan.durrani ] Mark Collette [ mark.collette ]
          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..
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Priority P1
          Assignee Mark Collette [ mark.collette ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: