Forum Discussion

keithkelly's avatar
2 years ago

Why is the Private Messages page Scrunching? (JavaScript)

I noticed our private notes pages get scrunched and unusable on low-resolution screens or smaller windows. 

Then I noticed a height that's set via JavaScript - changing whenever the page height changes:

So I debugged the (obfuscated) JS and came up with this line being the culprit:

Questions:

  1. How can I stop the auto-scrunching? 
  2. Does anyone else experience this?
  3. Is this Private Messages component intended to be viewed in a pop-up window or something? 

  • UPDATE / FIX:

    With some simple CSS I was able to de-scrunch our pretty-stock Private Messages page AND get rid of the triple-nested-scrollbar:

    In page/_private-notes-page.scss:

     

    .PrivateNotesPage{
      .lia-private-notes-page{ 
        .lia-quilt-row-main>.lia-quilt-column {
          height: auto; /* say no to boundaries */
        }
        .lia-notes-thread-list {
          margin-bottom: 40px; /* pm list has a personal bubble */
        }
      }
      .lia-content>.lia-top-quilt{
        .lia-quilt-row-main {
          min-height:400px; /* avoid awkwardness */      
          height: auto !important; /* fix mobile message list */
        }
        .lia-quilt-row-footer {
          border-top: 0px none; /* there's prob a better fix */
        }
      }
    }

     

     

  • Urgh.. 🧹

    I'm not sure if this would work, but can you override the G function?

    var origG = G;
    G = function(f, a, b) {
         alert("some new G");
         //return origG(f, a, b);
    }

      

    • keithkelly's avatar
      keithkelly
      Leader

      I'd expect this to work - until that file gets re-obfuscated/minified/scrunchified.  Does each recompile of the obfuscated file give the same method names? 

      Maybe I'll keep an eye on it for a while. But, I noticed Khoros' PM page doesn't do this. 

      Good idea for a hack though, I may end up resorting to this.