diff --git a/src/lib/core/option/option.ts b/src/lib/core/option/option.ts
index d04288e760d..e09955c86cf 100644
--- a/src/lib/core/option/option.ts
+++ b/src/lib/core/option/option.ts
@@ -146,7 +146,11 @@ export class MdOption extends _MdOptionMixinBase implements CanDisableRipple {
/** Sets focus onto this option. */
focus(): void {
- this._getHostElement().focus();
+ const element = this._getHostElement();
+
+ if ('focus' in element) {
+ element.focus();
+ }
}
/**
diff --git a/src/lib/select/select.ts b/src/lib/select/select.ts
index e9fd301effb..446e8a13129 100644
--- a/src/lib/select/select.ts
+++ b/src/lib/select/select.ts
@@ -56,6 +56,7 @@ import {
// considers such imports as unused (https://github.com/Microsoft/TypeScript/issues/14953)
// tslint:disable-next-line:no-unused-variable
import {ScrollStrategy, RepositionScrollStrategy} from '../core/overlay/scroll';
+import {Platform} from '@angular/cdk/platform';
/**
* The following style constants are necessary to save here in order
@@ -111,6 +112,13 @@ export const SELECT_PANEL_PADDING_Y = 16;
*/
export const SELECT_PANEL_VIEWPORT_PADDING = 8;
+/**
+ * Default minimum width of the trigger based on the CSS.
+ * Used as a fallback for server-side rendering.
+ * @docs-private
+ */
+const SELECT_TRIGGER_MIN_WIDTH = 112;
+
/** Injection token that determines the scroll handling while a select is open. */
export const MD_SELECT_SCROLL_STRATEGY =
new InjectionToken<() => ScrollStrategy>('md-select-scroll-strategy');
@@ -367,6 +375,7 @@ export class MdSelect extends _MdSelectMixinBase implements AfterContentInit, On
private _viewportRuler: ViewportRuler,
private _changeDetectorRef: ChangeDetectorRef,
private _overlay: Overlay,
+ private _platform: Platform,
renderer: Renderer2,
elementRef: ElementRef,
@Optional() private _dir: Directionality,
@@ -534,7 +543,9 @@ export class MdSelect extends _MdSelectMixinBase implements AfterContentInit, On
* the overlay width to the trigger width.
*/
private _setTriggerWidth(): void {
- this._triggerWidth = this._getTriggerRect().width;
+ this._triggerWidth = this._platform.isBrowser ? this._getTriggerRect().width :
+ SELECT_TRIGGER_MIN_WIDTH;
+
this._changeDetectorRef.markForCheck();
}
diff --git a/src/universal-app/kitchen-sink/kitchen-sink.html b/src/universal-app/kitchen-sink/kitchen-sink.html
index f1ed4e7e2b5..307e1fd96da 100644
--- a/src/universal-app/kitchen-sink/kitchen-sink.html
+++ b/src/universal-app/kitchen-sink/kitchen-sink.html
@@ -159,10 +159,10 @@