Beispiel #1
0
        protected virtual void OnDomDocumentCompleted(object sender, EventArgs ea)
        {
            GeckoDocumentCompletedEventArgs e = new GeckoDocumentCompletedEventArgs(ea);

            _browserDocumentLoaded = true;              // Document loaded once
            AdjustHeight();
            if (_entered)
            {
                this.Focus();

                IContainerControl containerControl = GetContainerControl();

                if ((containerControl != null) && (containerControl != this) && (containerControl.ActiveControl != this))
                {
                    containerControl.ActiveControl = this;
                }

                _browser.WebBrowserFocus.Activate();
                var element = (GeckoHtmlElement)_browser.Document.GetElementById("main");
                element.Focus();

                EnsureFocusedGeckoControlHasInputFocus();
            }
        }
Beispiel #2
0
		protected virtual void OnDomDocumentCompleted(object sender, EventArgs ea)
		{
			GeckoDocumentCompletedEventArgs e = new GeckoDocumentCompletedEventArgs(ea);
			_browserDocumentLoaded = true;  // Document loaded once
			AdjustHeight();
			if (_entered)
			{
				this.Focus();

				IContainerControl containerControl = GetContainerControl();

				if ((containerControl != null) && (containerControl != this) && (containerControl.ActiveControl != this))
					containerControl.ActiveControl = this;

				_browser.WebBrowserFocus.Activate();
				var element = (GeckoHtmlElement)_browser.Document.GetElementById("main");
				element.Focus();

				EnsureFocusedGeckoControlHasInputFocus();
			}
		}