Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Update notification is no longer modal #5062

Closed
peterflynn opened this issue Sep 5, 2013 · 6 comments
Closed

Update notification is no longer modal #5062

peterflynn opened this issue Sep 5, 2013 · 6 comments

Comments

@peterflynn
Copy link
Member

  1. To mimic an installed build finding an update, make these changes in UpdateNotification:
    • Comment out the if (_buildNumber === 0 && !force) block (lines 275-278) -- so the block inside never runs
    • Comment out the if (force || allUpdates[0].buildNumber > _lastNotifiedBuildNumber) test (line 294) -- so the block inside always runs
    • or - alternative: just add force = true; at the top of checkForUpdate().
  2. Reload Brackets

Result:
Update notification dialog appears but there's no dark gray "shield" behind it.
Blinking cursor is still in the editor area, and if you type it will modify the editor.
However, clicking/scrolling anywhere is still blocked, along with editor shortcuts like Ctrl+D or Ctrl+Z.
Hitting Esc still closes the dialog, but hitting Enter does not.

Expected:
Gray shield and all keystrokes go only to the dialog, same as if you show it via Help > Check for Updates.

I think the typing still working & the missing shield are both regressions due to PR #4714. Older builds may have shown a blinking cursor in the editor still, but I don't think typing would have actually done anything.

I think the problem is caused by the update popping up before the working set is restored, so the editor grabs focus from the dialog after the dialog is shown. (Not sure how it breaks the shield visuals, though -- especially since some sort of invisible shield is still clearly in place).

@peterflynn
Copy link
Member Author

Nominated for Sprint 31 since it was just introduced in 30. @TomMalbran would you want to take a look? Otherwise I think it's @njx who works on dialog/modality stuff the most.

@RaymondLim
Copy link
Contributor

@TomMalbran
I verified that your changes for #4687 introduced this issue. If you removed the z-index code for nested dialogs, then typing won't insert any text into the main editor. But for dark gray "shield" behind the dialog to show up, you will also have to remove the following css changes.

.modal-backdrop {
    opacity: 0;
}
.modal-backdrop:last-child {
    /* Only show the last modal backdrop */
    opacity: 0.5;
}

@peterflynn
Copy link
Member Author

Oops, forgot to add to Trello bug card. Added now.

@TomMalbran
Copy link
Contributor

Yes, it was a dirty fix, and unfortunately, it can't be fixed in CSS, so we might need a JS solution.

We will also need to focus the dialog to fix the other issue. I haven't seen any issue with the z-index.

@RaymondLim
Copy link
Contributor

FBNC to @peterflynn

@peterflynn
Copy link
Member Author

Confirmed fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants