It's preferable to post updates to the original thread to retain context, 
rather than starting an entirely new thread.

https://groups.google.com/d/msg/google-web-toolkit/6IIti4gp-us/ZuHBQhnYawUJ

You're looking for event.preventDefault().  But again, if you're simply 
trying to block the paste function (as opposed to enhancing it to add 
masking or validation features), this is strongly discouraged; it annoys 
users.

On Monday, April 7, 2014 8:49:31 AM UTC-7, Arun Kumar wrote:
>
> hi,
>
>      I want to discard the paste event.for this I caught the paste event. 
> But I'm failing to kill the event. If there is any chance to do it,pls give 
> me the solution.
> I tried event.cancelBubble(true); and  event.stopPropagation(); but these 
> two are not working for my requirement.
> My code:
>       class MyTextBox extends TextBox {
> public MyTextBox() {
>             super();
>             sinkEvents(Event.ONPASTE);
>         }
>         @Override
>         public void onBrowserEvent(Event event) {
>             super.onBrowserEvent(event);
>           
>             if(event.getTypeInt() == Event.ONPASTE){
>             // Window.alert(":: paste founded::");
>              //---- now i want to kill my current event.
>             }
>         }
> }
>
> pls show me the way to achieve my requirement.
> thanks in advance
> Arun Kumar
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to