Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent switching to disabled views (i.e. outline or attachments) in the sidebar #6327

Merged
merged 1 commit into from
Aug 7, 2015
Merged

Prevent switching to disabled views (i.e. outline or attachments) in the sidebar #6327

merged 1 commit into from
Aug 7, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

Currently in switchSidebarView there is code that attempts to handle the outline or attachments being disabled. However, given the placement of it, that code does not actually accomplish anything. Even more strange is the fact that the way that the buttons are disabled, that code won't ever be hit.
(Looking back with git blame, it seems that it has never worked as you'd expect.)

Hence this patch, which correctly disables switching to the outline or attachments views when they are disabled.
Once PR #6314 restores the 'pagemode' hash parameter, this patch thus makes it impossible to switch to a disabled sidebar view by modifying the 'pagemode' hash of an already loaded document.

…the sidebar

Currently in `switchSidebarView` there is code that attempts to handle the `outline` or `attachments` being disabled. However, given the placement of it, that code does not actually accomplish anything. Even more strange is the fact that the way that the buttons are disabled, that code won't ever be hit.
(Looking back with `git blame`, it seems that it has never worked as you'd expect.)

Hence this patch, which correctly disables switching to the `outline` or `attachments` views when they are disabled.
Once PR 6314 restores the 'pagemode' hash parameter, this patch thus makes it impossible to switch to a disabled sidebar view by modifying the 'pagemode' hash of an already loaded document.
@timvandermeij timvandermeij self-assigned this Aug 7, 2015
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Aug 7, 2015

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 1

Live output at: http://107.21.233.14:8877/60f71bf65c45139/output.txt

timvandermeij added a commit that referenced this pull request Aug 7, 2015
…itching-to-disabled-views

Prevent switching to disabled views (i.e. outline or attachments) in the sidebar
@timvandermeij timvandermeij merged commit 26b9205 into mozilla:master Aug 7, 2015
@timvandermeij
Copy link
Contributor

Good patch, thanks!

@Snuffleupagus Snuffleupagus deleted the viewer-sidebar-prevent-switching-to-disabled-views branch August 7, 2015 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants