| Index: third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js
|
| diff --git a/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js
|
| index 79578320bc01546e2f13312ebbb93fd8e4825d84..76907c362d5a8b290e3d82e1345732beb60e1ad8 100644
|
| --- a/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js
|
| +++ b/third_party/polymer/v1_0/components-chromium/iron-overlay-behavior/iron-overlay-behavior-extracted.js
|
| @@ -1,5 +1,3 @@
|
| -
|
| -
|
| /**
|
| Use `Polymer.IronOverlayBehavior` to implement an element that can be hidden or shown, and displays
|
| on top of other content. It includes an optional backdrop, and can be used to implement a variety
|
| @@ -12,7 +10,8 @@ intent. Closing generally implies that the user acknowledged the content on the
|
| it will cancel whenever the user taps outside it or presses the escape key. This behavior is
|
| configurable with the `no-cancel-on-esc-key` and the `no-cancel-on-outside-click` properties.
|
| `close()` should be called explicitly by the implementer when the user interacts with a control
|
| -in the overlay element.
|
| +in the overlay element. When the dialog is canceled, the overlay fires an 'iron-overlay-canceled'
|
| +event. Call `preventDefault` on this event to prevent the overlay from closing.
|
|
|
| ### Positioning
|
|
|
| @@ -183,6 +182,11 @@ context. You should place this element as a child of `<body>` whenever possible.
|
| * Cancels the overlay.
|
| */
|
| cancel: function() {
|
| + var cancelEvent = this.fire('iron-overlay-canceled', undefined, {cancelable: true});
|
| + if (cancelEvent.defaultPrevented) {
|
| + return;
|
| + }
|
| +
|
| this.opened = false;
|
| this._setCanceled(true);
|
| },
|
| @@ -419,6 +423,4 @@ context. You should place this element as a child of `<body>` whenever possible.
|
| };
|
|
|
| /** @polymerBehavior */
|
| - Polymer.IronOverlayBehavior = [Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];
|
| -
|
| -
|
| + Polymer.IronOverlayBehavior = [Polymer.IronFitBehavior, Polymer.IronResizableBehavior, Polymer.IronOverlayBehaviorImpl];
|
|
|