mirror of https://github.com/gorhill/uBlock.git
Fix management of reload button in popup panel
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1461
This commit is contained in:
parent
4d29a4c5d2
commit
a24e2a5d6c
|
@ -1032,8 +1032,8 @@ const reloadTab = function(ev) {
|
|||
// if there were changes or not.
|
||||
popupData.contentLastModified = -1;
|
||||
|
||||
// No need to wait to remove this.
|
||||
document.body.classList.remove('needReload');
|
||||
// Reset popup state hash to current state.
|
||||
hashFromPopupData(true);
|
||||
};
|
||||
|
||||
uDom('#refresh').on('click', reloadTab);
|
||||
|
@ -1277,7 +1277,7 @@ const pollForContentChange = (( ) => {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
const getPopupData = async function(tabId) {
|
||||
const getPopupData = async function(tabId, first = false) {
|
||||
const response = await messaging.send('popupPanel', {
|
||||
what: 'getPopupData',
|
||||
tabId,
|
||||
|
@ -1287,7 +1287,7 @@ const getPopupData = async function(tabId) {
|
|||
renderOnce();
|
||||
renderPopup();
|
||||
renderPopupLazy(); // low priority rendering
|
||||
hashFromPopupData(true);
|
||||
hashFromPopupData(first);
|
||||
pollForContentChange();
|
||||
};
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ const getPopupData = async function(tabId) {
|
|||
document.body.classList.remove('loading');
|
||||
};
|
||||
|
||||
getPopupData(tabId).then(( ) => {
|
||||
getPopupData(tabId, true).then(( ) => {
|
||||
if ( document.readyState !== 'complete' ) {
|
||||
self.addEventListener('load', ( ) => { checkViewport(); }, { once: true });
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue