Modernizr switch the head tag and body tag position

Created on 26 May 2016  路  8Comments  路  Source: Modernizr/Modernizr

Hey,
I think the best thing is to write less and understand a lot^^ ,

I am creating a templating page generator with php. The problem when I include the script tags near to closed body with modernizer top of the js script's list the head and body changed, then if i commented out modernizer the tags are correct is this a bug?, here are the pics

btw thx for this awesome "mordernizer" respect <3 馃憤 馃挴/馃挴 :3 gg

capture d ecran 2016-05-26 a 18 59 22

capture d ecran 2016-05-26 a 19 09 32

Most helpful comment

I just went through basically every option, and in my case, this was the test that cause the error:

input[type="number"] Localization

No clue why, but removing this test fixes it, and it reoccurs when I bring it back.

FWIW:
Modernizr 3.6.0 with Chrome 68 on Mac

All 8 comments

its also scroll to bottom when i refresh the page, i tried to find solution but i found that the issue was closed :(

@YounesKeraressi I am not quite sure I understand the question.

By default, Modernizr adds a number of classes to the HTML tag after it loads. if you don't want that to happen, you can uncheck the "Add css classes" option https://modernizr.com/download

as for the scrolling to the bottom, I would need to see the page to help

but why close it dude? is by closing resolve the issue? as i said clearly, when i inject scripts via php to a page, mordernizr change the head and body tag of current page, i even sent a images to be clearly understood, and about the page jump its not first time that people face this kind of think i even search on stackoverflow dint find a solution :) , and the topics was closed like y did for this one!!

Hi @YounesKeraressi, I think this is a duplicate of #1836.

Are you using a custom version of Modernizr, or a development build? Try to customize your build here https://modernizr.com/download and see if the issue still persists. #1836 narrowed the bug down to use of Modernizr.localizednumber and if you're not using that feature then you can safely remove it from your build.

@YounesKeraressi sorry for not being clearer, it was closed because the first thing is a feature, and the second thing is a duplicate issue

@radium-v and @patrickkettner , thx for your helping , i dint knew how i couldn't get the #1836 post by searching on google!

I just went through basically every option, and in my case, this was the test that cause the error:

input[type="number"] Localization

No clue why, but removing this test fixes it, and it reoccurs when I bring it back.

FWIW:
Modernizr 3.6.0 with Chrome 68 on Mac

Can confirm that removing input[type="number"] Localization also fixed our "scroll to the bottom on load" issue. +1
No idea what the number input type has to do with it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

claudchan picture claudchan  路  7Comments

lovetrivedi picture lovetrivedi  路  4Comments

aaarichter picture aaarichter  路  6Comments

DervishD picture DervishD  路  8Comments

chrisbell08 picture chrisbell08  路  6Comments