Community
Participate
Working Groups
Build Identifier: 20110301-1815 Hallo to all, we have a problem with textfield. A the textfield is an "FocusListener". It works in RCP right but not in RAP. When you change the text field with the tab it work correct in RCP an RAP (marked the text). I you click in the text it works in RCP and don’t markt the text. In RAP works different. You click slow in the field, it function sometime. If you click fast it don't function ever. The Text with label a create in the package "util". Eclipse: 3.6 64bit RAP 1.4 Thanks Alexander Reproducible: Always
Created attachment 204650 [details] Two small project to reproduce the bug Two small project to reproduce the bug. The Text with label a create in the package "util".
Alex, I can reproduce the issue with your test project and RAP from CVS HEAD.
The problem is the following. The focused control (FocusEvent) is send from client-to-server on client mousedown event. With the same mousedown event the selection is changed to empty, but this new selection (selection start and length) is added to the request parameters in *mouseup* event (TextUtil.js). Thus, when there is a big delay between mousedown and mouseup event on the client, the FocusEvent on the server is fired on the old selection. If old selection is still the complete text, due to preserve mechanism, it is not rendered back to the client.
Fixed by adding the changed selection (start, length) request parameter in mousedown too (TextUtil.js). Changes are in CVS HEAD.
Hallo, I have tested with the current nightly build. You can reproduce it with the same added project. The different is when you click in the text it marked ever (by slow and fast). I wont to click with mouse in the text field, the text don’t marked. Thanks Alexander
Alex, which browser are you using? Is the problem persist in all browsers - IE, Firefox, Chrome, Safari and Opera?
(In reply to comment #6) > Alex, which browser are you using? Is the problem persist in all browsers - IE, > Firefox, Chrome, Safari and Opera? Hallo Ivan, Sorry that I answer yet. I was some day in holiday. We used Firefox but is in all browsers.
Hi Alex, I can't reproduce it anymore. Tested with all browsers and current CVS HEAD. Are you sure that you are using the nightly runtime build from: repo: http://download.eclipse.org/rt/rap/nightly/runtime/ zip: https://hudson.eclipse.org/hudson/job/rap-runtime/lastStableBuild/
Hi Ivan, i used the current nightly build. The function „selectAll()“ works. My bug was: I wont to click with mouse in the text field. The text don’t marked if i used “FocusListener” with „selectAll()“.
Hi Alex, I understand your problem and it was reproducible for me before the fix. Unfortunately, I can't reproduce it anymore with your RAP test project and CVS HEAD. Click with a mouse inside a Text, triggers FocusListener that calls sellectAll - this works for me in all browsers.
Created attachment 205418 [details] Small Project for test with nigthly build Added small Project it was modify for RAP 1.5
I Added a the small Project where the start is modify for RAP 1.5
Alex.... still works for me. Please do the following: Run your snippet inside Eclipse and type "ss" command in the osgi console. Please post here the bundles list.
Framework is launched. id State Bundle 0 ACTIVE org.eclipse.osgi_3.8.0.v20110908-1857 Fragments=33 1 ACTIVE org.mortbay.jetty.server_6.1.23.v201012071420 2 ACTIVE org.eclipse.equinox.preferences_3.4.100.v20110823-1251 3 RESOLVED org.eclipse.core.databinding.property.nl_de_3.6.0.v20100814043401 Master=14 4 ACTIVE org.eclipse.equinox.http.jetty_2.0.100.v20110502 5 ACTIVE com.ibm.icu.base_4.4.2.v20110831 6 ACTIVE org.eclipse.rap.jface_1.5.0.20111018-0113 Fragments=19 7 ACTIVE org.eclipse.equinox.http.servlet_1.1.300.v20110829-1633 8 ACTIVE org.eclipse.osgi.services_3.3.0.v20110711-1243 9 ACTIVE org.eclipse.rap.design.example_1.5.0.20111018-0113 10 ACTIVE RAP_Test_1.0.0.qualifier 11 RESOLVED org.eclipse.rap.ui.workbench.nl_de_3.6.0.v20100814043401 Master=35 12 ACTIVE org.eclipse.core.expressions_3.4.300.v20110228 13 ACTIVE org.eclipse.rap.demo_1.5.0.20111018-0113 14 ACTIVE org.eclipse.core.databinding.property_1.4.0.I20110222-0800 Fragments=3 15 ACTIVE org.eclipse.core.databinding.beans_1.2.100.I20100824-0800 Fragments=30 16 ACTIVE org.mortbay.jetty.util_6.1.23.v201012071420 17 ACTIVE org.eclipse.rap.demo.databinding_1.5.0.20111018-0113 18 ACTIVE org.eclipse.rap.rwt_1.5.0.20111018-0113 Fragments=21 19 RESOLVED org.eclipse.rap.jface.nl_de_3.6.0.v20100814043401 Master=6 20 RESOLVED org.eclipse.core.databinding.nl_de_3.6.0.v20100814043401 Master=37 21 RESOLVED org.eclipse.rap.rwt.nl_de_3.6.0.v20100814043401 Master=18 22 RESOLVED org.eclipse.rap.ui.nl_de_3.6.0.v20100814043401 Master=32 23 ACTIVE org.eclipse.core.commands_3.6.0.I20110111-0800 24 ACTIVE org.eclipse.rap.jface.databinding_1.5.0.20111018-0113 Fragments=45 25 ACTIVE org.eclipse.rap.ui.forms_1.5.0.20111018-0113 Fragments=29 26 RESOLVED org.eclipse.core.databinding.observable.nl_de_3.6.0.v20100814043401 Master=42 27 ACTIVE org.eclipse.rap.rwt.osgi_1.5.0.20111018-0113 28 ACTIVE org.eclipse.equinox.registry_3.5.200.v20110815-1601 29 RESOLVED org.eclipse.rap.ui.forms.nl_de_3.6.0.v20100814043401 Master=25 30 RESOLVED org.eclipse.core.databinding.beans.nl_de_3.6.0.v20100814043401 Master=15 31 ACTIVE javax.servlet_2.5.0.v201103041518 32 ACTIVE org.eclipse.rap.ui_1.5.0.20111018-0113 Fragments=22 33 RESOLVED org.eclipse.equinox.servletbridge.extensionbundle_1.2.0.v20100503 Master=0 34 RESOLVED org.eclipse.rap.ui.views.nl_de_3.6.0.v20100814043401 Master=44 35 ACTIVE org.eclipse.rap.ui.workbench_1.5.0.20111018-0113 Fragments=11 36 ACTIVE org.eclipse.core.runtime_3.7.0.v20110912-1510 37 ACTIVE org.eclipse.core.databinding_1.4.0.I20110111-0800 Fragments=20 38 ACTIVE org.eclipse.help_3.5.100.v20110426 39 ACTIVE org.eclipse.core.jobs_3.5.200.v20110721-1714 40 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523 41 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321 42 ACTIVE org.eclipse.core.databinding.observable_1.4.0.I20110222-0800 Fragments=26 43 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524 44 ACTIVE org.eclipse.rap.ui.views_1.5.0.20111018-0113 Fragments=34 45 RESOLVED org.eclipse.rap.jface.databinding.nl_de_3.6.0.v20100814043401 Master=24 46 ACTIVE org.eclipse.equinox.http.registry_1.1.100.v20110502
Everything looks good. Could you try to guide me step-by-step where to click in order to reproduce it?
The current situation with the nightly build (RAP) and the "FocusListener" (with selectAll()) is: Text field one Switch with "tap" to next text field (with text) The text is marked Text field one Switch with "mouse" to next text field (with text) The text is marked The attitude in RCP and the "FocusListener" (with selectAll()) is: Text field one Switch text field to other with "tap" Text marked Text field one Switch with "mouse" to next text field (with text) The text is –don’t-- marked This is what i won’t.
(In reply to comment #16) Alex, form your explanation RAP behaves correctly, isn't it (please confirm)? If you have problems with RCP (SWT) please open a bug against Platform.
(In reply to comment #17) > (In reply to comment #16) > Alex, form your explanation RAP behaves correctly, isn't it (please confirm)? > If you have problems with RCP (SWT) please open a bug against Platform. Ivan, do you mean update the head discription and title? In RCP it works OK.
Alex, in comment #16 you say that: > The attitude in RCP and the "FocusListener" (with selectAll()) is: > Text field one > Switch text field to other with "tap" > Text marked > Text field one > Switch with "mouse" to next text field (with text) > The text is –don’t— marked > This is what i won’t. which means that RCP does not behave correct - text is not selected if you call selectAll in focusGain. In comment #18 you said that: > In RCP it works OK. These are two opposite statements. Does RAP behave correctly - yes or no?
Ivan, in Comment 19 you said that: > which means that RCP does not behave correct - text is not selected if you call > selectAll in focusGain RCP works correct. The text doesn’t mark if go in with MOUSE. In Comment 19 you said that: > These are two opposite statements. Does RAP behave correctly - yes or no? For my, no.
Now I understand - the text should *not* be selected, when you focus the Text widget by mouse even the selectAll is called in focusedGain. But I don't think that this is a correct behavior (even if it works in RCP). From my POV selectAll in focusedGain event should select the text regardless how the Text is focused (mouse or TAB). We should check how it behaves in GTK.
I'm still thinking that selectAll in focusedGain event should select the text regardless how the Text is focused. Will close it as WONTFIX.