Progress Box doesn't update after window's size changed



  • Use Case 1: starting with a maximized window. Open:

    http://what.thedailywtf.com/t/body-is-too-similar-to-what-you-recently-posted/277/1

    The progress-box shows something like "4 of 41". Now "restore" (un-maximize) the browser window.
    Expected result: Update display to "1 of 41".
    Observed result: No change.

    Use Case 2: starting with a small window. Open that same topic. The progress-box shows something like "2 of 41" (or "1 of 41" if you're willing to have only a line or two visible on the screen). Now maximize the window.
    Expected result: Update display to "4 of 41" (or whatever it should be).
    Observed result: No change.

    Use Case 3: (probably easiest to test) Just toggle the Topic Details. Same lack of update. The "expected" values can be found out by scrolling down a bit and then up.


  • Banned

    Still true, yes, and I can confirm -- but any scrolling whatsoever will produce the correct (ish) value on the progress bar.



  • Can't you just fix this by window.onresize = function() { scroll by zero pixels to trigger the event }, then?


  • BINNED

    @ben_lubar said:

    Can't you just fix this by window.onresize = function() { scroll by zero pixels to trigger the event }, then?

    Horrible, horrible hack.

    I like it!


  • Banned

    Maybe! Submit a PR if that works and doesn't regress other stuff.

    Filed under: So I can revert it


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.