Author Topic: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)  (Read 1968 times)

0 Members and 1 Guest are viewing this topic.

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
[code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
See here.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
Someone should replace is_webkit && codeFix[ i ].offsetHeight < 20 with is_webkit && codeFix[ i ].offsetHeight < 20 && codeFix[ i ].offsetHeight > 0 in smf_codeBoxFix() (HLP's theme.js).

That function tries to calculate the correct height for code blocks which fails if the code block is hidden. It then sets a fixed height of 20px which causes the problem. A proper fix would be to run the function after the code block becomes visible but that's much more complicated and AFAICT the fix isn't needed anymore either.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
While this IS an issue specific to chrome (in that I at least could not replicate in FF/Edge/IE), I went ahead and made the changes, I also deployed it to the Themes/default one as well.

Took a while for cache purging and what all to update, but once it did, I verified that it worked in Chrome as intended and that previous browsers behaviour did not change.

Behaviour should now be uniform, please advise of any cases otherwise.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

  

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
Doesn't seem to be working, even though I cleared the HLP site data and force-refreshed.  Maybe I'm getting an older copy from CloudFlare or something?  I'll try it again later to see if it changes.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
Something is still cache serving the state of the file as of 2013-06-29, not sure what or where or how.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
The issue only ever appeared in Chrome (and probably Safari) since the is_webkit part of the condition means that the bugged code only runs in WebKit browsers (which Chrome and Safari are).

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
Which is a significant amount.  I'm guessing about 60-65% of all users based on this (also, why isn't IE dead yet?! XP users??):

Hidden Text: Show

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
IE is still available in 10 (As well as 7/Vista) and Edge will 'failback' (or can) to IE if compatibility gets tripped or is otherwise elected.

Still doesn't explain how/why the changes I made to the theme.js file hasn't propigated correctly or in a uniform fashion. It randomly works, currently but it still never updates the direct file view version.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
IE is still available in 10 (As well as 7/Vista) and Edge will 'failback' (or can) to IE if compatibility gets tripped or is otherwise elected.

Still doesn't explain how/why the changes I made to the theme.js file hasn't propigated correctly or in a uniform fashion. It randomly works, currently but it still never updates the direct file view version.

Is theme.js stored in multiple locations, and some code references one location, and some another?  I'd do a search for theme.js in the HLP site files if that was possibly the case, and then search for the code referencing the location of the old file. 

Of course, I'm far from any sort of webdev / coder, so please ignore if that's not a possibility.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Minecraft
    • Steam
    • Twitter
    • ModDB Feature
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
There are 3 locations, HLP_20, default and core; I've modified all three. Outside of that, I haven't a clue.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline jr2

  • The Mail Man
  • 212
  • It's prounounced jayartoo 0x6A7232
    • Steam
Re: [code] in [hidden] doesn't work correctly (does not expand; Chrome browser)
There are 3 locations, HLP_20, default and core; I've modified all three. Outside of that, I haven't a clue.

Is there a way to override theme.js by explicitly calling for certain behavior in the code somewhere?  (Guessing if that's possible you could find it by searching for something that would have to be in the old version of that code, like
Code: [Select]
is_webkit && codeFix[ i ].offsetHeight or something)