info.magnolia.ui.vaadin.gwt.client.editor.jsni
Class WebkitFrameEventHandler

java.lang.Object
  extended by info.magnolia.ui.vaadin.gwt.client.editor.jsni.AbstractFrameEventHandler
      extended by info.magnolia.ui.vaadin.gwt.client.editor.jsni.WebkitFrameEventHandler

public class WebkitFrameEventHandler
extends AbstractFrameEventHandler

WebkitFrameEventHandler. Provides separated implementations to overcome different bugs in the handling of iframes on webkit browsers including the iPad. See SCRUM-1593 for details.


Constructor Summary
WebkitFrameEventHandler()
           
 
Method Summary
 void init()
           
 void initNativeKeyListener(com.google.gwt.dom.client.Element element)
          Catches key events on the contentDocument of the frame Element and fires it on the frame to enable event bubbling from the frame up to the DOM.
 void initNativeTouchSelectionListener(com.google.gwt.dom.client.Element element, PageEditorView.Listener listener)
          Custom implementation for iPads of the touch end handling.
 void notifyUrlChange()
           
 void onFrameReady()
           
 void registerLoadHandler()
          Registers two separated implementations of an onload event.
 void registerUnloadHandler(com.google.gwt.dom.client.Element element, com.google.gwt.user.client.Timer timer)
          This function is supposed to trigger an unload event, when the page inside the Iframe is changed.
 
Methods inherited from class info.magnolia.ui.vaadin.gwt.client.editor.jsni.AbstractFrameEventHandler
getEventBus, getView, initNativeMouseSelectionListener, initScrollListener, reloadIFrame, setEventBus, setView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebkitFrameEventHandler

public WebkitFrameEventHandler()
Method Detail

init

public void init()
Specified by:
init in class AbstractFrameEventHandler

onFrameReady

public void onFrameReady()
Overrides:
onFrameReady in class AbstractFrameEventHandler

registerLoadHandler

public void registerLoadHandler()
Registers two separated implementations of an onload event. In case the onload is not triggered it's supposed to fallback on a readystate poller. We have to make sure, that they don't interfere by using a loaded boolean.


notifyUrlChange

public void notifyUrlChange()
Specified by:
notifyUrlChange in class AbstractFrameEventHandler

registerUnloadHandler

public void registerUnloadHandler(com.google.gwt.dom.client.Element element,
                                  com.google.gwt.user.client.Timer timer)
This function is supposed to trigger an unload event, when the page inside the Iframe is changed. Doesn't work, that's why browsing inside the iframe is broken for webkit.


initNativeTouchSelectionListener

public void initNativeTouchSelectionListener(com.google.gwt.dom.client.Element element,
                                             PageEditorView.Listener listener)
Custom implementation for iPads of the touch end handling. Suppresses the selection, when scrolling.

Overrides:
initNativeTouchSelectionListener in class AbstractFrameEventHandler

initNativeKeyListener

public void initNativeKeyListener(com.google.gwt.dom.client.Element element)
Description copied from class: AbstractFrameEventHandler
Catches key events on the contentDocument of the frame Element and fires it on the frame to enable event bubbling from the frame up to the DOM.

Specified by:
initNativeKeyListener in class AbstractFrameEventHandler


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.