Hi,
In my build of the 17th (will try the latest build later), if I have selectOnFocus on true then the complete value gets selected when clicking with the mouse. I would expect that a mouseclick would not select the complete value but put the cursor at the click position.
Hi,
The code reproduces it, in chrome I consistently get a complete select on mouse click, in ff it happens 2 out 3 times, in ie on windows 7 it happens all the time:
I first click in the field to enter a value
then click outside of the field on the page
then click in the field again, the complete value gets selected
Looking at the code, it seems that SC code does element.select without checking if a mouseclick is the cause of the event, in FormItem.focusInItem, which gets called on native focus events also.
Sorry for not letting you know, it’s queued for someone to look at but it’s been assigned a low priority. It’s an interesting effect, but does it have real world consequences? Typically selectOnFocus is only used in rare cases where this effect doesn’t matter (like a one-line modal input dialog).
Hi,
For us it is important for user productivity. I use it for this usecase (which occurs many many times in our app):
when a user selects something from a drop-down/suggestion box then the focus moves automatically to the next field
in the next field the complete value should be selected
Also when a form opens and the first field gets the focus the complete value should be selected.
I achieve this by setting selectOnFocus to true (only for textareas I set it to false). Is there maybe another way?
I tried to do this next value selection explicitly by calling selectValue, but I noticed that the selection was not maintained on redraws. This gave the result that I shortly saw a value being selected and then the selection got lost on redraws.
Also on IE the selection of a value did not always seem to work with selectValue while selectOnFocus worked fine.
Hi,
I am afraid I still see this behavior in the 8.1 build.
I am using the nightly 8.1 build of the 9th of september, there selectOnFocus=true will still select the complete value when clicking with the mouse in a field.
Understood.
The fix was made in mainline and never got ported to the 8.1 branch for you. We’re taking care of this today so the fix should show up in the next nightly (8.1.x) build.
Let us know if you continue to have trouble with it
Hi,
we’ve had the same problem after upgrade to smartGWT 2.5.
It seems it was fixed in some nightly build (tried on: /builds/SmartGWT/2.x/LGPL/2011-10-09).
Unfortunately, we can hardly use nightly builds in our app. So, do you think, there will be some stable version released soon? Or some minor bug fix (hotfix) release, that we can calm down our team leader?
Thanks a lot for the answer.