Fix error page in shadow dom
Previously, if any page was loaded with ?dom=shadow, nothing would work because the error view 'blocked' the rest of the screen. This updates the CSS so that the error view display:none instead of display:flex. Bug: Issue 6372 Change-Id: I0965eea5e51a034a4401fbea0f583694a0df059c
This commit is contained in:
@@ -75,7 +75,7 @@ limitations under the License.
|
||||
}
|
||||
.errorView {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
@@ -84,6 +84,9 @@ limitations under the License.
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.errorView.show {
|
||||
display: flex;
|
||||
}
|
||||
.errorEmoji {
|
||||
font-size: 2.6em;
|
||||
}
|
||||
@@ -147,7 +150,7 @@ limitations under the License.
|
||||
<template is="dom-if" if="[[_showCLAView]]" restamp="true">
|
||||
<gr-cla-view path="[[_path]]"></gr-cla-view>
|
||||
</template>
|
||||
<div id="errorView" class="errorView" hidden>
|
||||
<div id="errorView" class="errorView">
|
||||
<div class="errorEmoji">[[_lastError.emoji]]</div>
|
||||
<div class="errorText">[[_lastError.text]]</div>
|
||||
<div class="errorMoreInfo">[[_lastError.moreInfo]]</div>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
},
|
||||
|
||||
_viewChanged(view) {
|
||||
this.$.errorView.hidden = true;
|
||||
this.$.errorView.classList.remove('show');
|
||||
this.set('_showChangeListView', view === 'gr-change-list-view');
|
||||
this.set('_showDashboardView', view === 'gr-dashboard-view');
|
||||
this.set('_showChangeView', view === 'gr-change-view');
|
||||
@@ -163,7 +163,7 @@
|
||||
this.set(showProp, false);
|
||||
}
|
||||
|
||||
this.$.errorView.hidden = false;
|
||||
this.$.errorView.classList.add('show');
|
||||
const response = e.detail.response;
|
||||
const err = {text: [response.status, response.statusText].join(' ')};
|
||||
if (response.status === 404) {
|
||||
|
||||
Reference in New Issue
Block a user