Pivot
  1. Pivot
  2. PIVOT-707

TextArea cant be edited when pivot applet loses focus

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: wtk
    • Labels:
    • Environment:
      ArchLinux, Firefox 3.6.11, Java(TM) SE Runtime Environment (build 1.6.0_22-b04) - Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)

      Description

      When using a TextArea component and change to another browser tab (or take another action that cause the Pivot applet to lose its focus) then get back to the pivot applet browser's tab and try to edit the text inside TextArea component: text will not change, nothing happens neither the Applet Console shows any message.

      This behaviour can be reproduced with Component Explorer in http://pivot.apache.org/demos/component-explorer.html

        Issue Links

          Activity

          Hide
          Nelson Garcia added a comment -

          TextInput is also affected.

          Show
          Nelson Garcia added a comment - TextInput is also affected.
          Hide
          Chris Bartlett added a comment -

          Unable to reproduce on WinXP Home SP3 with Oracle 1.6.0_24 JRE and the following browsers.
          Tried http://pivot.apache.org/demos/component-explorer.html (Text -> TextArea) and http://pivot.apache.org/tutorials/text-areas.html

          Firefox 3.6.13
          Chrome 9.0.597.98
          Internet Explorer 8.0.6001

          Show
          Chris Bartlett added a comment - Unable to reproduce on WinXP Home SP3 with Oracle 1.6.0_24 JRE and the following browsers. Tried http://pivot.apache.org/demos/component-explorer.html (Text -> TextArea) and http://pivot.apache.org/tutorials/text-areas.html Firefox 3.6.13 Chrome 9.0.597.98 Internet Explorer 8.0.6001
          Hide
          Chris Bartlett added a comment -

          Nelson, can you please test with http://pivot.apache.org/tutorials/text-areas.html and also with another browser?

          Show
          Chris Bartlett added a comment - Nelson, can you please test with http://pivot.apache.org/tutorials/text-areas.html and also with another browser?
          Hide
          Chris Bartlett added a comment -

          Also unable to reproduce with Opera 11.01 Build 1190 with the same tests & system as my first comment.

          Show
          Chris Bartlett added a comment - Also unable to reproduce with Opera 11.01 Build 1190 with the same tests & system as my first comment.
          Hide
          Sandro Martini added a comment -

          Assigned to 2.0.1, just to not forget it

          Show
          Sandro Martini added a comment - Assigned to 2.0.1, just to not forget it
          Hide
          Chris Bartlett added a comment -

          Unable to reproduce on Windows XP Professional x64 SP2 using the same 4 browsers and JRE (32 bit) as my earlier comments.

          Ubuntu 10.10 Desktop 32 bit & Oracle 1.6.0_22 JRE
          Unable to reproduce with Opera 11.00 Build 1156
          Reproduced with Chromium 8.0.552.237 and Firefox 3.6.13

          After losing and regaining focus, Component Explorer no longer shows any ComponentKeyListener events occurring.
          This also affects various applets I tested from the Pivot Tutorial including the Lists tutorial (http://pivot.apache.org/tutorials/lists.html)
          In Firefox, key events are processed again after reloading the Lists tutorial page, but not in Chromium.
          However reloading Component Explorer sorts out the key events in both Firefox & Chromium.

          Will try to reproduce this behaviour in non-Pivot applets next.

          Show
          Chris Bartlett added a comment - Unable to reproduce on Windows XP Professional x64 SP2 using the same 4 browsers and JRE (32 bit) as my earlier comments. Ubuntu 10.10 Desktop 32 bit & Oracle 1.6.0_22 JRE Unable to reproduce with Opera 11.00 Build 1156 Reproduced with Chromium 8.0.552.237 and Firefox 3.6.13 After losing and regaining focus, Component Explorer no longer shows any ComponentKeyListener events occurring. This also affects various applets I tested from the Pivot Tutorial including the Lists tutorial ( http://pivot.apache.org/tutorials/lists.html ) In Firefox, key events are processed again after reloading the Lists tutorial page, but not in Chromium. However reloading Component Explorer sorts out the key events in both Firefox & Chromium. Will try to reproduce this behaviour in non-Pivot applets next.
          Hide
          Nelson Garcia added a comment -

          Tried with Lists Tutorial, using the same system as said in my initial comment and is reproducible. Tested also with FF2.0.0.20 & IE6 SP2 on WinXP SP2, 32bit, but was unable to reproduce.

          BTW, reloading isn't an option because I'm building a commercial app and reloading may cause data lose or reprocesing (also angry users/bosses). Thanks for your help.

          Show
          Nelson Garcia added a comment - Tried with Lists Tutorial, using the same system as said in my initial comment and is reproducible. Tested also with FF2.0.0.20 & IE6 SP2 on WinXP SP2, 32bit, but was unable to reproduce. BTW, reloading isn't an option because I'm building a commercial app and reloading may cause data lose or reprocesing (also angry users/bosses). Thanks for your help.
          Hide
          Chris Bartlett added a comment -

          My comments about reloading the page were just there to document the behaviour that I saw and that it was sometimes different between Chromium and FF.

          Are you able to reproduce this behavior with non-Pivot applets in FF? If you can, then it would certainly suggest an OS/Browser issue rather than a Pivot one.

          Show
          Chris Bartlett added a comment - My comments about reloading the page were just there to document the behaviour that I saw and that it was sometimes different between Chromium and FF. Are you able to reproduce this behavior with non-Pivot applets in FF? If you can, then it would certainly suggest an OS/Browser issue rather than a Pivot one.
          Hide
          Nelson Garcia added a comment -

          Thanks Chris, no problem with your comment on reloading, it's clear now. I tried with Opera 11.01 (build 1190), the same apps (tutorial-text-areas, component explorer, my app), in the same system and it worked. Also tried with GNU IceCat (based on Mozilla) and reproduced the problem. It seems to be related to Mozilla browsers.

          When working on stand alone app mode, problem doesn't happen.

          I don't know what you mean with non-Pivot applets. What is it? a normal applet/japplet with a swing text area?

          Show
          Nelson Garcia added a comment - Thanks Chris, no problem with your comment on reloading, it's clear now. I tried with Opera 11.01 (build 1190), the same apps (tutorial-text-areas, component explorer, my app), in the same system and it worked. Also tried with GNU IceCat (based on Mozilla) and reproduced the problem. It seems to be related to Mozilla browsers. When working on stand alone app mode, problem doesn't happen. I don't know what you mean with non-Pivot applets. What is it? a normal applet/japplet with a swing text area?
          Hide
          Chris Bartlett added a comment -

          Yes, by non-Pivot applet I mean a Java Applet that doesn't use any Pivot code. I wanted to see if the same problem happens in Firefox to all applets, or if it seems to only Pivot ones. This will help to determine if it is a Pivot problem, or a Firefox one (or something else entirely).

          I have tried to reproduce the issue with a few non-Pivot applets that I found from Google searches, but so far they all seem to work OK. Here is an example of one that allows typing after it regains focus. http://java.comsci.us/examples/awt/TextField.html

          I also searched for Firefox applet issues regarding focusing and found a small number of reports that seem to match the behaviour you described (and that I reproduced). http://ubuntuforums.org/showthread.php?t=1080699
          http://support.mozilla.com/bs/questions/686520
          http://forums.oracle.com/forums/thread.jspa?threadID=1291951&tstart=240

          A couple of postings seemed to suggest that this might be a fairly recent problem with Firefox, and that it used to work with older versions. If you able to install older Firefox versions, that would also be a useful test.

          It might also be good to ask a question to a Firefox/Linux mailing list or forum to see if they have any suggestions.

          Show
          Chris Bartlett added a comment - Yes, by non-Pivot applet I mean a Java Applet that doesn't use any Pivot code. I wanted to see if the same problem happens in Firefox to all applets, or if it seems to only Pivot ones. This will help to determine if it is a Pivot problem, or a Firefox one (or something else entirely). I have tried to reproduce the issue with a few non-Pivot applets that I found from Google searches, but so far they all seem to work OK. Here is an example of one that allows typing after it regains focus. http://java.comsci.us/examples/awt/TextField.html I also searched for Firefox applet issues regarding focusing and found a small number of reports that seem to match the behaviour you described (and that I reproduced). http://ubuntuforums.org/showthread.php?t=1080699 http://support.mozilla.com/bs/questions/686520 http://forums.oracle.com/forums/thread.jspa?threadID=1291951&tstart=240 A couple of postings seemed to suggest that this might be a fairly recent problem with Firefox, and that it used to work with older versions. If you able to install older Firefox versions, that would also be a useful test. It might also be good to ask a question to a Firefox/Linux mailing list or forum to see if they have any suggestions.
          Hide
          Sandro Martini added a comment -

          Hi all,
          some news on this (keep for 2.0.1) ? Or move to 2.1 ?

          Show
          Sandro Martini added a comment - Hi all, some news on this (keep for 2.0.1) ? Or move to 2.1 ?
          Hide
          Nelson Garcia added a comment -

          Hi Sandro. I tried with non-Pivot applets as Chris said and all worked fine. This problem seems to be related to Mozilla browsers only and Pivot applets only. No more news.

          Show
          Nelson Garcia added a comment - Hi Sandro. I tried with non-Pivot applets as Chris said and all worked fine. This problem seems to be related to Mozilla browsers only and Pivot applets only. No more news.
          Hide
          Sandro Martini added a comment -

          Hi Nelson, thank you very much for the new info.
          I'll try to look at it, but at this point I don't know if it will be fixed in time for the 2.0.1 ...

          Thank you for now.
          Bye

          Show
          Sandro Martini added a comment - Hi Nelson, thank you very much for the new info. I'll try to look at it, but at this point I don't know if it will be fixed in time for the 2.0.1 ... Thank you for now. Bye
          Hide
          Chris Bartlett added a comment -

          Repeated tests from
          https://issues.apache.org/jira/browse/PIVOT-707?focusedCommentId=12998080&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12998080

          Using Ubuntu 11.04 Desktop 32bit & Oracle 1.6.0_26 JRE
          Unable to reproduce with Opera 11.50 Build 1074
          Reproduced with Chromium 12.0.742.112 and Firefox 5.0

          Show
          Chris Bartlett added a comment - Repeated tests from https://issues.apache.org/jira/browse/PIVOT-707?focusedCommentId=12998080&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12998080 Using Ubuntu 11.04 Desktop 32bit & Oracle 1.6.0_26 JRE Unable to reproduce with Opera 11.50 Build 1074 Reproduced with Chromium 12.0.742.112 and Firefox 5.0
          Hide
          Sandro Martini added a comment -

          This requires more tests, so move to 2.0.2

          Show
          Sandro Martini added a comment - This requires more tests, so move to 2.0.2
          Hide
          Sandro Martini added a comment -

          Give more priority to this issue because it's happening on Linux (on many versions of Firefox and Chrome), and even with recent releases of Java (6Update30 and 7Update2). We have to debug from a Linux envronment.

          More than TextArea, seems a bug in Focus handling in Pivot ... Swing Applets doesn't seem to have this problem.

          Some discussion here:
          http://apache-pivot-users.399431.n3.nabble.com/Pivot-with-Firefox-on-Ubuntu-td3639839.html
          and even here:
          http://apache-pivot-users.399431.n3.nabble.com/Keyboard-events-ignored-in-Google-Chrome-Firefox-on-Ubuntu-Linux-td3702872.html

          Show
          Sandro Martini added a comment - Give more priority to this issue because it's happening on Linux (on many versions of Firefox and Chrome), and even with recent releases of Java (6Update30 and 7Update2). We have to debug from a Linux envronment. More than TextArea, seems a bug in Focus handling in Pivot ... Swing Applets doesn't seem to have this problem. Some discussion here: http://apache-pivot-users.399431.n3.nabble.com/Pivot-with-Firefox-on-Ubuntu-td3639839.html and even here: http://apache-pivot-users.399431.n3.nabble.com/Keyboard-events-ignored-in-Google-Chrome-Firefox-on-Ubuntu-Linux-td3702872.html
          Hide
          Piotr Kołaczkowski added a comment -

          Sent a patch for PIVOT-782. Should fix also this issue.

          Show
          Piotr Kołaczkowski added a comment - Sent a patch for PIVOT-782 . Should fix also this issue.
          Hide
          Piotr Kołaczkowski added a comment -

          BTW: The fix works fine both with Firefox 9 and Chrome 16 on Ubuntu 11.10.

          Show
          Piotr Kołaczkowski added a comment - BTW: The fix works fine both with Firefox 9 and Chrome 16 on Ubuntu 11.10.
          Hide
          Sandro Martini added a comment -

          Resolved (with the committed fix for PIVOT-782), but be free to reopen if necessary.

          Show
          Sandro Martini added a comment - Resolved (with the committed fix for PIVOT-782 ), but be free to reopen if necessary.

            People

            • Assignee:
              Sandro Martini
              Reporter:
              Nelson Garcia
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development