Examples of preventDefault()


Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

          if (event.getTypeInt() == com.google.gwt.user.client.Event.ONKEYDOWN)
          {
            NativeEvent nEvent = event.getNativeEvent();
            if (nEvent.getCtrlKey() && nEvent.getKeyCode() == 'R')
            {
              nEvent.preventDefault();
            }
           
            if (nEvent.getKeyCode() == 116)//F5
            {
              nEvent.preventDefault();
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

              nEvent.preventDefault();
            }
           
            if (nEvent.getKeyCode() == 116)//F5
            {
              nEvent.preventDefault();
            }
          }
        }
      });
    }
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

    NativeEvent nativeEvent = event.getNativeEvent();

    if (!event.isCanceled()
        && (event.getTypeInt() == Event.ONMOUSEDOWN)
        && isCaptionEvent(nativeEvent)) {
      nativeEvent.preventDefault();
    }

    super.onPreviewNativeEvent(event);
  }
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

                        String url = element.getAttribute("href");
                        String viewPath = getViewPath(url);
                        if (viewPath != null) {
                            GWT.log("Forcing History.newItem(\"" + viewPath + "\")...");
                            History.newItem(viewPath);
                            nativeEvent.preventDefault();
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

        // We need to preventDefault() on mouseDown events (outside of the
        // DialogBox content) to keep text from being selected when it
        // is dragged.
        if(target.isOrHasChild(dragTarget)) {
          // Log.debug("ViewContainer.onPreviewNativeEvent() - preventing default..");
          ne.preventDefault();
        }
      case Event.ONMOUSEUP:
      case Event.ONMOUSEMOVE:
      case Event.ONCLICK:
      case Event.ONDBLCLICK: {
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

                                currentDrag
                                        .setElementOver((com.google.gwt.user.client.Element) targetElement);
                                currentDropHandler.dragOver(currentDrag);
                            }
                            // prevent text selection on IE
                            nativeEvent.preventDefault();
                            return;
                        default:
                            // just update element over and let the actual
                            // handling code do the thing
                            // ApplicationConnection.getConsole().log(
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()

            case Event.ONMOUSEMOVE:
            case Event.ONTOUCHMOVE:
                if (currentDropHandler != null) {
                    currentDropHandler.dragOver(currentDrag);
                }
                nativeEvent.preventDefault();

                break;

            case Event.ONTOUCHEND:
                /* Avoid simulated event on drag end */
 
View Full Code Here

Examples of com.google.gwt.event.dom.client.TouchMoveEvent.preventDefault()

      @Override
      public void onScrollMove(ScrollMoveEvent event) {
        TouchMoveEvent moveEvent = event.getEvent();
        moveEvent.stopPropagation();
        moveEvent.preventDefault();
      }
    });

    MGWT.addOrientationChangeHandler(new OrientationChangeHandler() {
View Full Code Here

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

    offsetY = e.getClientY() - elem.getAbsoluteTop();

    isDragging = true;
    // sink capture events
    MouseEventCapture.capture(new CaptureMouseListener());
    e.preventDefault();
  }

  public void setContentProvider(PopupContentProvider provider) {
    contentProvider = provider;
  }
View Full Code Here

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

                // 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
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.