Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Event.preventDefault()


 
  protected void onContextMenu(int row) {
      if(contextMenu != null) {
          Event event = Event.getCurrentEvent();
            event.cancelBubble(true);
            event.preventDefault();
            contextMenuTarget = items.get(row);
            contextMenu.load(AsyncCallbackFactory.<Void>defaultNewInstance());
            contextMenu.showPopup(null);
      }
    }
View Full Code Here


                // a modifier key is held (ctrl to open in new tab etc)
                Event e = DOM.eventGetCurrentEvent();
                if (!e.getCtrlKey() && !e.getAltKey() && !e.getShiftKey()
                        && !e.getMetaKey()) {
                    Window.open(src, target, features);
                    e.preventDefault();
                }
            }
        }
    }
View Full Code Here

                    break;
                default:
                    // do nothing
            }
            event.cancel();
            nativeEvent.preventDefault();
            nativeEvent.stopPropagation();
        }

    }
View Full Code Here

                // a modifier key is held (ctrl to open in new tab etc)
                Event e = DOM.eventGetCurrentEvent();
                if (!e.getCtrlKey() && !e.getAltKey() && !e.getShiftKey()
                        && !e.getMetaKey()) {
                    Window.open(src, target, features);
                    e.preventDefault();
                }
            }
        }
    }
View Full Code Here

          // we don't want any sort of keyboard scrolling while the slideshow is up, regardless
          // of the exact keycode. The combination of preventDefault() and stopPropagation() is
          // necessary in both FF and IE. As a historical note, one can do without the
          // stopPropagation() in FF if one also does a preventDefault on keypress,
          // but this is little more than a curiosity.
          nativeEvent.preventDefault();
          nativeEvent.stopPropagation();
        }
      }
    });
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.