Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2016-04-26 05:42:51 -0400
committerGerrit Code Review @ Eclipse.org2016-04-28 03:09:28 -0400
commitb2c673ec1e454b84b1d0bec18bad8f9f7c9e340a (patch)
tree67361e198193de35ef694804abfb16c7ba8d25f9 /bundles
parent8a9e7ee7766aa7417dd6c0b064d6938c15644d43 (diff)
downloadorg.eclipse.rap-b2c673ec1e454b84b1d0bec18bad8f9f7c9e340a.tar.gz
org.eclipse.rap-b2c673ec1e454b84b1d0bec18bad8f9f7c9e340a.tar.xz
org.eclipse.rap-b2c673ec1e454b84b1d0bec18bad8f9f7c9e340a.zip
Disable DOM element focusing in some widgets
Most of the browsers auto-scroll DOM element into view, when it's focused. This leads to unwanted app scroll, when website-like scrolling is eanbled. Set widget enableElementFocus property to false for Grid, List, Composite, Group, ScrolledComposite, TabFolder and CTabfolder. Change-Id: I4fdc64e429081b5dc6673143223cef3449afc2b5
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/CTabFolder.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/Composite.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/Grid.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/Group.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/List.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/ScrolledComposite.js3
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/TabFolder.js3
7 files changed, 14 insertions, 7 deletions
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/CTabFolder.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/CTabFolder.js
index 95df2e0d5d..6efb9c8ece 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/CTabFolder.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/CTabFolder.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 Innoopract Informationssysteme GmbH.
+ * Copyright (c) 2002, 2016 Innoopract Informationssysteme GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ rwt.qx.Class.define( "rwt.widgets.CTabFolder", {
this.setHideFocus( true );
this.setAppearance( "ctabfolder" );
this.setOverflow( "hidden" );
+ this.setEnableElementFocus( false );
this._tabPosition = "top";
this._tabHeight = 0;
this._selectionForeground = null;
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Composite.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Composite.js
index 24b12577f8..366105d833 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Composite.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Composite.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 EclipseSource and others.
+ * Copyright (c) 2009, 2016 EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -20,6 +20,7 @@ rwt.qx.Class.define( "rwt.widgets.Composite", {
this.setAppearance( "composite" );
this.setOverflow( "hidden" );
this.setHideFocus( true );
+ this.setEnableElementFocus( false );
// Disable scrolling (see bug 345903)
rwt.widgets.base.Widget.disableScrolling( this );
this._clientArea = [ 0, 0, 0, 0 ];
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Grid.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Grid.js
index 6a0d0f7e87..435fbc11fe 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Grid.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Grid.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2010, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,6 +47,7 @@ rwt.qx.Class.define( "rwt.widgets.Grid", {
this._config = this._rowContainer.getRenderConfig();
this.setCursor( "default" );
this.setOverflow( "hidden" );
+ this.setEnableElementFocus( false );
rwt.widgets.base.Widget.disableScrolling( this ); // see bugs 279460 and 364739
rwt.widgets.util.ScrollBarsActivator.install( this );
this._configureScrollBars();
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Group.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Group.js
index 47b73e12cd..99108b0a19 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Group.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/Group.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2002, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@ rwt.qx.Class.define( "rwt.widgets.Group", {
this._legend.setAppearance( "group-box-legend" );
this.add( this._legend );
this.setOverflow( "hidden" );
+ this.setEnableElementFocus( false );
var themeValues = new rwt.theme.ThemeValues( {} );
this._themeBackgroundColor = themeValues.getCssColor( "Group-Label", "background-color" );
themeValues.dispose();
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/List.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/List.js
index 66a7f00b2f..b733575203 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/List.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/List.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright: 2004, 2015 1&1 Internet AG, Germany, http://www.1und1.de,
+ * Copyright: 2004, 2016 1&1 Internet AG, Germany, http://www.1und1.de,
* and EclipseSource
*
* This program and the accompanying materials are made available under the
@@ -19,6 +19,7 @@ rwt.qx.Class.define( "rwt.widgets.List", {
this.base( arguments, new rwt.widgets.base.VerticalBoxLayout() );
this.setAppearance( "list" );
this.setScrollBarsVisible( false, false );
+ this.setEnableElementFocus( false );
this._manager = new rwt.widgets.util.SelectionManager( this._clientArea );
this._manager.setMultiSelection( multiSelection );
this._manager.setDragSelection( false );
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/ScrolledComposite.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/ScrolledComposite.js
index 576939603c..7d47789d9b 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/ScrolledComposite.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/ScrolledComposite.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2014 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2002, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ rwt.qx.Class.define( "rwt.widgets.ScrolledComposite", {
this._focusRoot = null;
this.addEventListener( "changeParent", this._onChangeParent, this );
this.setAppearance( "scrolledcomposite" );
+ this.setEnableElementFocus( false );
},
members : {
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/TabFolder.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/TabFolder.js
index d59a626d49..139481370b 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/TabFolder.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/TabFolder.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 1&1 Internet AG, Germany, http://www.1und1.de,
+ * Copyright (c) 2004, 2016 1&1 Internet AG, Germany, http://www.1und1.de,
* EclipseSource and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -25,6 +25,7 @@ rwt.qx.Class.define("rwt.widgets.TabFolder", {
this._bar = new rwt.widgets.base.TabFolderBar();
this._pane = new rwt.widgets.base.TabFolderPane();
this.add( this._bar, this._pane );
+ this.setEnableElementFocus( false );
},
properties : {

Back to the top