Fixing: Screen Flicker bug in IE by disabling the Modal Dialog Box in SharePoint 2010
There's a bug in the latest version of IE that causes a flicker in the greyed out section. This can be very distracting and has caused complaints and seizures. Okay, maybe not seizures, but it could happen.
To rectify this, as we have no control over the browser or patching, we decided to set every list to open in the form view, not the modal dialog view. So, we needed a PowerShell script to accomplish this since we have hundreds of sites and thousands of lists.
The PowerShell command to set this is:
$list.NavigateForFormsPages = $true
$list.update()
Note that the setting NavigateForFormsPages should be set to true for Form or False for modal dialog.
Now we need to loop through each site and hit each list. Here's the code I came up with:
#############################################################################
$webcount = 0
$listcount = 0
$webs = (Get-SPSite -limit all | Get-SPWeb -Limit all -ErrorAction SilentlyContinue)
if($webs.count -ge 1 -OR $webs.count -eq $null)
{
foreach($web in $webs)
{
#Populate all lists in the current web
$lists = $web.Lists
Write-Host "Website"$web.url -ForegroundColor Green
foreach($list in $lists)
{
$listcount +=1
Write-Host " – "$list.Title
$list.NavigateForFormsPages = $true
$list.update()
}
$webcount +=1
$web.Dispose()
}
#Show total counter for checked webs & lists
Write-Host "Number of webs checked:"$webcount
Write-Host "Number of lists:"$listcount
}
else
{
Write-Host "Nothing retrieved, please check your permissions" -ForegroundColor Red -BackgroundColor Black
}
#############################################################################
To rectify this, as we have no control over the browser or patching, we decided to set every list to open in the form view, not the modal dialog view. So, we needed a PowerShell script to accomplish this since we have hundreds of sites and thousands of lists.
The PowerShell command to set this is:
$list.NavigateForFormsPages = $true
$list.update()
Note that the setting NavigateForFormsPages should be set to true for Form or False for modal dialog.
Now we need to loop through each site and hit each list. Here's the code I came up with:
#############################################################################
$webcount = 0
$listcount = 0
$webs = (Get-SPSite -limit all | Get-SPWeb -Limit all -ErrorAction SilentlyContinue)
if($webs.count -ge 1 -OR $webs.count -eq $null)
{
foreach($web in $webs)
{
#Populate all lists in the current web
$lists = $web.Lists
Write-Host "Website"$web.url -ForegroundColor Green
foreach($list in $lists)
{
$listcount +=1
Write-Host " – "$list.Title
$list.NavigateForFormsPages = $true
$list.update()
}
$webcount +=1
$web.Dispose()
}
#Show total counter for checked webs & lists
Write-Host "Number of webs checked:"$webcount
Write-Host "Number of lists:"$listcount
}
else
{
Write-Host "Nothing retrieved, please check your permissions" -ForegroundColor Red -BackgroundColor Black
}
#############################################################################
Comments
Post a Comment