@@ -28,6 +28,11 @@ namespace OpenQA.Selenium.IE
2828 /// </summary>
2929 public enum InternetExplorerElementScrollBehavior
3030 {
31+ /// <summary>
32+ /// Indicates the behavior is unspecified.
33+ /// </summary>
34+ Default ,
35+
3136 /// <summary>
3237 /// Scrolls elements to align with the top of the viewport.
3338 /// </summary>
@@ -126,7 +131,7 @@ public class InternetExplorerOptions : DriverOptions
126131 private TimeSpan fileUploadDialogTimeout = TimeSpan . MinValue ;
127132 private string initialBrowserUrl = string . Empty ;
128133 private string browserCommandLineArguments = string . Empty ;
129- private InternetExplorerElementScrollBehavior elementScrollBehavior = InternetExplorerElementScrollBehavior . Top ;
134+ private InternetExplorerElementScrollBehavior elementScrollBehavior = InternetExplorerElementScrollBehavior . Default ;
130135 private Dictionary < string , object > additionalCapabilities = new Dictionary < string , object > ( ) ;
131136 private Dictionary < string , object > additionalInternetExplorerOptions = new Dictionary < string , object > ( ) ;
132137
@@ -432,9 +437,16 @@ private Dictionary<string, object> BuildInternetExplorerOptionsDictionary()
432437 internetExplorerOptionsDictionary [ InitialBrowserUrlCapability ] = this . initialBrowserUrl ;
433438 }
434439
435- if ( this . elementScrollBehavior == InternetExplorerElementScrollBehavior . Bottom )
440+ if ( this . elementScrollBehavior != InternetExplorerElementScrollBehavior . Default )
436441 {
437- internetExplorerOptionsDictionary [ ElementScrollBehaviorCapability ] = 1 ;
442+ if ( this . elementScrollBehavior == InternetExplorerElementScrollBehavior . Bottom )
443+ {
444+ internetExplorerOptionsDictionary [ ElementScrollBehaviorCapability ] = 1 ;
445+ }
446+ else
447+ {
448+ internetExplorerOptionsDictionary [ ElementScrollBehaviorCapability ] = 0 ;
449+ }
438450 }
439451
440452 if ( this . browserAttachTimeout != TimeSpan . MinValue )
0 commit comments