diff --git a/src/components/app/app.ts b/src/components/app/app.ts index 883f1cb43b..aa76a86375 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -4,7 +4,7 @@ import { Title, DOCUMENT } from '@angular/platform-browser'; import { IonicApp } from './app-root'; import * as Constants from './app-constants'; import { ClickBlock } from './click-block'; -import { runInDev } from '../../util/util'; +import { runInDev, assert } from '../../util/util'; import { Config } from '../../config/config'; import { isNav, NavOptions, DIRECTION_FORWARD, DIRECTION_BACK } from '../../navigation/nav-util'; import { MenuController } from './menu-controller'; @@ -226,6 +226,8 @@ export class App { * @hidden */ present(enteringView: ViewController, opts: NavOptions, appPortal?: number): Promise { + assert(enteringView.isOverlay, 'presented view controller needs to be an overlay'); + const portal = this._appRoot._getPortal(appPortal); // Set Nav must be set here in order to dimiss() work synchnously. diff --git a/src/components/app/overlay-portal.ts b/src/components/app/overlay-portal.ts index 0bc79493a8..78b213efc3 100644 --- a/src/components/app/overlay-portal.ts +++ b/src/components/app/overlay-portal.ts @@ -9,6 +9,7 @@ import { Keyboard } from '../../platform/keyboard'; import { NavControllerBase } from '../../navigation/nav-controller-base'; import { Platform } from '../../platform/platform'; import { TransitionController } from '../../transitions/transition-controller'; +import { ViewController } from '../../navigation/view-controller'; /** * @hidden @@ -40,8 +41,10 @@ export class OverlayPortal extends NavControllerBase { // on every page change make sure the portal has // dismissed any views that should be auto dismissed on page change - app.viewDidLeave.subscribe((ev: any) => { - !ev.isOverlay && this.dismissPageChangeViews(); + app.viewDidLeave.subscribe((view: ViewController) => { + if (!view.isOverlay) { + this.dismissPageChangeViews(); + } }); } diff --git a/src/components/app/test/typography/app.module.ts b/src/components/app/test/typography/app.module.ts deleted file mode 100644 index 524f4fbd56..0000000000 --- a/src/components/app/test/typography/app.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { IonicApp, IonicModule, App } from '../../../..'; - - -@Component({ - templateUrl: 'main.html' -}) -export class AppComponent { - constructor(app: App) { - app.setTitle('Basic Buttons'); - } -} - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - IonicModule.forRoot(AppComponent) - ], - bootstrap: [IonicApp] -}) -export class AppModule {} diff --git a/src/components/app/test/typography/app/app.component.ts b/src/components/app/test/typography/app/app.component.ts new file mode 100644 index 0000000000..40cb41e266 --- /dev/null +++ b/src/components/app/test/typography/app/app.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; +import { PageOne } from '../pages/page-one/page-one'; + +@Component({ + template: '' +}) +export class AppComponent { + rootPage = PageOne; +} diff --git a/src/components/app/test/typography/app/app.module.ts b/src/components/app/test/typography/app/app.module.ts new file mode 100644 index 0000000000..5f208149a9 --- /dev/null +++ b/src/components/app/test/typography/app/app.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { IonicApp, IonicModule } from '../../../../..'; + +import { AppComponent } from './app.component'; +import { PageOneModule } from '../pages/page-one/page-one.module'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule, + IonicModule.forRoot(AppComponent, {}), + PageOneModule + ], + bootstrap: [IonicApp], + entryComponents: [ + ] +}) +export class AppModule {} diff --git a/src/components/app/test/typography/main.ts b/src/components/app/test/typography/app/main.ts similarity index 100% rename from src/components/app/test/typography/main.ts rename to src/components/app/test/typography/app/main.ts diff --git a/src/components/app/test/typography/main.html b/src/components/app/test/typography/pages/page-one/page-one.html similarity index 56% rename from src/components/app/test/typography/main.html rename to src/components/app/test/typography/pages/page-one/page-one.html index 2a84763109..12c5ab5d4e 100644 --- a/src/components/app/test/typography/main.html +++ b/src/components/app/test/typography/pages/page-one/page-one.html @@ -11,11 +11,11 @@

H1: The quick brown fox jumps over the lazy dog

-

H2: The quick brown fox jumps over the lazy dog

+

H2: The quick brown fox jumps over the lazy dog

H3: The quick brown fox jumps over the lazy dog

-

H4: The quick brown fox jumps over the lazy dog

+

H4: The quick brown fox jumps over the lazy dog

H5: The quick brown fox jumps over the lazy dog
@@ -23,9 +23,9 @@

I saw a werewolf with a Chinese menu in his hand. - Walking through the streets of Soho in the rain. - He was looking for a place called Lee Ho Fook's. - Gonna get a big dish of beef chow mein. + Walking through the streets of Soho in the rain. + He was looking for a place called Lee Ho Fook's. + Gonna get a big dish of beef chow mein.

@@ -34,7 +34,7 @@ Better stay away from him. He'll rip your lungs out, Jim. I'd like to meet his tailor. - +

\ No newline at end of file diff --git a/src/components/app/test/typography/pages/page-one/page-one.module.ts b/src/components/app/test/typography/pages/page-one/page-one.module.ts new file mode 100644 index 0000000000..8b48a5850d --- /dev/null +++ b/src/components/app/test/typography/pages/page-one/page-one.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { IonicPageModule } from '../../../../../..'; + +import { PageOne } from './page-one'; + +@NgModule({ + declarations: [ + PageOne, + ], + imports: [ + IonicPageModule.forChild(PageOne), + ], + entryComponents: [ + PageOne, + ] +}) +export class PageOneModule {} diff --git a/src/components/app/test/typography/pages/page-one/page-one.ts b/src/components/app/test/typography/pages/page-one/page-one.ts new file mode 100644 index 0000000000..b822cceac5 --- /dev/null +++ b/src/components/app/test/typography/pages/page-one/page-one.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +import { IonicPage } from '../../../../../..'; + +@IonicPage({ + name: 'page-one' +}) +@Component({ + templateUrl: 'page-one.html' +}) +export class PageOne { } diff --git a/src/components/item/item-reorder-gesture.ts b/src/components/item/item-reorder-gesture.ts index 26b007d8fb..374fdf164f 100644 --- a/src/components/item/item-reorder-gesture.ts +++ b/src/components/item/item-reorder-gesture.ts @@ -134,7 +134,8 @@ export class ItemReorderGesture { } private itemForCoord(coord: PointerCoordinates): HTMLElement { - const x = this.offset.x - 100; + const sideOffset = this.plt.isRTL ? 100 : -100; + const x = this.offset.x + sideOffset; const y = coord.y; const element = this.plt.getElementFromPoint(x, y); return findReorderItem(element, this.reorderList.getNativeElement()); diff --git a/src/components/select/select.ts b/src/components/select/select.ts index 61eb75f439..2ae817ca9e 100644 --- a/src/components/select/select.ts +++ b/src/components/select/select.ts @@ -151,6 +151,7 @@ export class Select extends BaseInput implements OnDestroy { _multi: boolean = false; _options: QueryList