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

Table of Contents does not return to previous state #326

Closed
ghobona opened this issue Dec 3, 2021 · 4 comments
Closed

Table of Contents does not return to previous state #326

ghobona opened this issue Dec 3, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ghobona
Copy link

ghobona commented Dec 3, 2021

When you contract and then expand the Table of Contents (ToC), it does not return to its previous state.

Tested with this document https://docs.ogc.org/is/19-086r4/19-086r4.html

metanorma_ogc_toc

@ronaldtse ronaldtse added the bug Something isn't working label Dec 5, 2021
@ronaldtse
Copy link
Contributor

Thanks @ghobona , this is confirmed. Interestingly this issue doesn't happen with the other flavors, maybe some identifier issue.

@ronaldtse
Copy link
Contributor

@s4birli would you be able to help fix this in the document here (https://docs.ogc.org/is/19-086r4/19-086r4.html)?

  1. Provide a JS fix for this issue
  2. Describe the fix in this ticket (maybe with a diff) so @opoudjis can implement the fix in metanorma-ogc.

Thanks!

@s4birli
Copy link

s4birli commented Dec 6, 2021

This issue is due to adding the margin-left: 298px when showing the nav again.

$('#toggle').on('click', function(){
    if( $('nav').is(':visible') ) {
        $('nav').animate({ 'left': '-353px' }, 'slow', function(){
            $('nav').hide();
        });
        $('body').animate({ 'margin-left': '0' }, 'slow');
    }
    else {
        $('nav').show(); //newly added
        $('nav').animate({ 'left': '0px' }, 'slow');
        // $('body').animate({ 'margin-left': '298px' }, 'slow');        please delete this code
    }
});

@ronaldtse
Copy link
Contributor

Thanks @s4birli !

opoudjis added a commit to metanorma/metanorma-generic that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-cc that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-csa that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-bipm that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-iho that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-iec that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-itu that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-m3aawg that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-mpfa that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-ribose that referenced this issue Dec 6, 2021
opoudjis added a commit to metanorma/metanorma-un that referenced this issue Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants