Home
About Us
Advertise
Printable version
SharePoint 2010: Mobile Devices and Scrolling
By Randy Drisgill
May 10, 2011 —
(Page 2 of 2)
So how do we fix this problem? Turns out there are a few options:
Option 1:
Turn off the ribbon for anonymous users
This method uses
<Sharepoint:SPSecurityTrimmedControl>
and
<asp:LoginView>
to remove the ribbon control for anonymous users as well as to change some of the CSS that is automatically applied. This is a simple solution, since most anonymous users have no reason to see or use the ribbon. One thing to consider, though, is that the login button will disappear, so you will need to add a login link for yourself, or remember the URL /_layouts/authenticate.aspx.
Option 2:
This is perhaps the simplest solution, as all you are really doing is removing some code and overriding the body CSS to make sure SharePoint turns off the default ribbon positioning behavior. Once the code is in place, devices should be able to scroll fine, but for all users, the ribbon will now scroll away on really long pages. This is very easy, but if you do a lot of long page editing, it can be really frustrating to chase the ribbon up and down the page.
Option 3:
Turn off the automatic ribbon positioning and replace it with CSS positioning
This is probably the most complicated solution in the bunch, but it is also the closest to out-of-the-box behavior. In this method, you actually override the default ribbon JavaScript with custom code that uses CSS instead of script to pin the ribbon to the top of the page. This is probably how Microsoft should have done it initially for simplicity (but I’m sure there were technical reasons why JavaScript was a more complete solution for them). Unfortunately, adding it in later involves overriding default behavior, which can be risky, so use this method at your own risk.
So at the end of the day, which solution is best for you? It all depends on how you plan to use the ribbon in your site. If no anonymous or mobile users need the ribbon, option 1 should be fine. If you don’t care if the ribbon scrolls off the page, option 2 will work. And lastly, if you want the closest to the out-of-the-box experience for the ribbon but still have mobile users that need access to it, option 3 is probably the most complete.
For Todd’s solution, option 1 was the simplest and best solution... and for the record, I made him make the changes himself (I like him, but not
that
much).
Randy Drisgill is a consultant at SharePoint911 and a Microsoft MVP in the technology.
Pages
1
2
Share this link:
https://sptechweb.com/link/35515
Related Articles
Customizing SharePoint Online Using SharePoint Designer, Part 1
Once you get a handle on SharePoint Online, the question becomes: How can I modify it to suit my needs. First of two parts.
Planning your search strategy is more important than ever
Enabling everyone in your organization to find content within seconds creates big ROI potential.
Hello Newman... er, SharePoint
Don’t be deterred by SharePoint haters, there’s a lot the technology has to offer for developers
Add comment
Name*
Email*
Country
United States
Canada
Afghanistan
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua & Barbuda
Antilles, Netherlands
Arabia, Saudi
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas, The
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
British Virgin Islands
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Cook Islands
Costa Rica
Cote D'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
East Timor (Timor-Leste)
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
Gabon
Gambia, the
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guinea, Equatorial
Guyana
Haiti
Holland (see Netherlands)
Honduras
Hong Kong, (China)
Hungary
Iceland
India
Indonesia
Iran, Islamic Republic of
Iraq
Ireland
Israel
Italy
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Korea (North)
Korea (South)
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macao, (China)
Macedonia, TFYR
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Territory
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Poland
Portugal
Puerto Rico
Qatar
Reunion
Romania
Russia (Russian Federation)
Rwanda
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia & Montenegro
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
Spain
Sri Lanka
Sudan
Suriname
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste (East Timor)
Togo
Tokelau
Tonga
Trinidad & Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
Uruguay
Uzbekistan
Vanuatu
Vatican City State (Holy See)
Venezuela
VietNam
Virgin Islands, British
Virgin Islands, U.S.
Wallis and Futuna
Western Sahara
Yemen
Zambia
Zanzibar
Zimbabwe
[Not specified]
Compose