No tried that. When you use the right click context menu of the mouse to 'Paste' into the textbox the regular event handlers cannot detect the 'change'. So I had to resort the code I added in the first post.
- Sunit Katkar http://sunitkatkar.blogspot.com/ On Thu, Dec 16, 2010 at 8:29 AM, Nick Newman <[email protected]>wrote: > Would listening for the changeEvent be a more direct approach? > > Nick > > On Wed, Dec 15, 2010 at 11:15 PM, Sunit Katkar <[email protected]>wrote: > >> Any ideas?? >> >> >> - Sunit Katkar >> http://sunitkatkar.blogspot.com/ >> >> >> >> On Tue, Dec 14, 2010 at 2:25 PM, Sunit Katkar <[email protected]>wrote: >> >>> I have a simple GWT TextBox widget. >>> >>> When a user types anything in it, I listen for keyboard events and enable >>> a button. >>> >>> Now if the user simply copies the text from some other browser window >>> using the mouse and the mouse context menu and then uses the same mouse >>> context menu to paste in the TextBox, this event is not detected. >>> >>> So I extended a TextBox and added a sinkEvents(Event.ONPASTE); in the >>> constructor. >>> >>> Also in the onBrowserEvent() method I check for the event type. If its a >>> Event.ONPASTE, I fire a ValueChangeEvent.fire() >>> >>> Now in the event handling code, I override the >>> onValueChange(ValueChangeEvent<String> event) and detect any change and >>> enable the button. >>> >>> So far so good. The problem is with Google Chrome browser. Firefox and >>> IE7, IE8 detect this mouse based paste correctly, but Chrome does not. >>> >>> Any ideas? >>> >>> - Sunit Katkar >>> http://sunitkatkar.blogspot.com/ >>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<google-web-toolkit%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
