// should not be in the document focus flow
getElement().setTabIndex(-1);
TouchScrollDelegate.enableTouchScrolling(this, getElement());
+ }
+ /**
+ * Start to periodically monitor for parent element resizes if embedded
+ * application (e.g. portlet).
+ */
+ protected void onLoad() {
+ super.onLoad();
if (isMonitoringParentSize()) {
resizeTimer = new Timer() {
@Override
}
}
+ /**
+ * Stop monitoring for parent element resizes.
+ */
+ @Override
+ protected void onUnload() {
+ if (resizeTimer != null) {
+ resizeTimer.cancel();
+ resizeTimer = null;
+ }
+ super.onUnload();
+ }
+
/**
* Called when the window or parent div might have been resized.
*