Page 1 of 7 1 2 3 ... LastLast
Results 1 to 10 of 63

Thread: extra intraneous scrollbar

  1. #1
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default extra intraneous scrollbar

    This has been a thing for a LONG time (definition of "long" may vary, considering I've only been here for 3 years now), and I'm surprised I didn't manage to find any report of this so far.


    Mafia seems to be adding a 2nd scrollbar to fight.php result pages seemingly at random.
    BDHeOblhPE_part_1.png
    BDHeOblhPE_part_2.png

    This intraneous scrollbar spans the entire height of the pre-existing page, even after considering the content that mafia may add to it (such as the "Found this fight" text), meaning that scrolling this scroll-bar achieves absolutely nothing beneficial. The amount it lets you scroll down also seems to correspond to the amount of content added to the bottom of the page by mafia; maybe what this is is mafia doing two things at once to fix the same "issue" (increasing the size of the preexisting page, AND adding the scroll-bar)?

    t8aumQIjgt.png

    This would simply be a "quirky, peculiar little interaction" if it wasn't for this fact: the intraneous scroll-bar has priority. This means that any attempt to scroll the page will first scroll "this" scroll-bar, which won't go far, and which will then prevent you from scrolling any further for a good 1-2 seconds if you don't move the mouse.

    I grabbed the frame's source, in case it helps: https://pastebin.com/BLiP5PdM

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    13,538

    Default

    I'll let somebody who uses (has ever used) the CAB investigate this.
    I have literally never seen this using KoLmafia's Stationary Buttons.

  3. #3
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    Ok, so with the help of Katarn and Zdrvst, we've been digging, and found where this comes from: turns out this is unrelated to the CAB.

    Turns out, this actually comes from the "You acquire an item:" sections. More precisely, acquiring any type of equipment.


    First, little reminder: if you acquire an equipment item, mafia will add an [equip] link right of it. (If it's a weapon, there'll be [equip] and [offhand])
    Well, when hovering over one of these links, mafia will actually show a popup message showing (...or attempting to) how your character will change once that item is equipped.
    This/these popups' size, being pre-determined on page load, then hidden, are what pushes the page downwards.

    THEN, the fact that the page is set to style="overflow: auto;" is what causes this extra length to be converted into an additional scroll-bar, instead of merging it with the previous one!

    firefox_fabaFe7Xje.png

  4. #4
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,831

    Default

    If I recall correctly, the overflow issue is still slightly related to the CAB. On fight pages, without the CAB the content is all in the <body> tags, like most web pages in existence. With the CAB enabled, the content is inexplicably all in a div that isn't even in the body and has to have its height set by CSS.

    This is based on my memory from years ago when I was making BatMan RE compatible with the CAB, which I recall being a bit of a headache due to this issue. This may no longer be correct, but I'm sharing just in case it's helpful in solving the issue -- and I do suspect the issue will not occur for non-CAB users.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Woss | Om****est (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  5. #5
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    Ah, yes, I guess I mixed things up when we discovered what was the cause of the added white space at the end of pages.

    What mixed things up was seeing that it also happened in very small "you acquire an item" sections:
    unknown.png
    20200910_kol_mafia_scrollbar.png

    So let me get things clear:
    What causes the additional white space at the end of pages is that hidden popup(s), which, in itself, may be seen as a bug???

    If you are using the CAB while getting this extra white space, then you get the bug mentioned in this thread, which is an additional scroll-bar instead of extending the current one.

  6. #6
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    Sorry, I was wrong; it's not just the [equip] links, potions' [use] link do that, too, and I'm surely forgetting other things...firefox_azHJxe6Jpn.png
    Last edited by fredg1; 09-12-2020 at 01:56 AM.

  7. #7
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    I seem to have found a solution.

    The problem gravitates around the fact mafia toggles the table's "visibility" when hovering over it.
    firefox_QwGSMfsCFc.pngfirefox_CNfubnC5bW.png

    This problem is "solved" (leaving space for doubt, in case it secretly breaks something) by having it toggle it's "display":
    firefox_WDleGyNeaE.pngfirefox_GmiDW4U8Jl.png
    Done in this patch: UseLinkDecorator.java.patch

    This only triggers the intraneous scroll-bar to appear when you hover over the link. Already an improvement.
    The only issue here is that the scrollbar "bats" the link a little further to the left, so there's some glitching happening if you try to hover on the right side of the link (it frantically alternates between displayed and not displayed ).

  8. #8
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    The intraneous scroll-bar itself is directly caused by line 319 of StationaryButtonDecorator.java
    which adds <div style='overflow: auto;'>
    firefox_1R1sIn9v3X.pngfirefox_BHZ0ARau9r.png

    Looking at possible other values for that line:


    '' (<nothing>): expands the previous scrollbar.
    ---auto: gives an extra scroll-bar
    ---hidden: doesn't let you scroll to the overflow content
    ---inherit: parent already seems to be auto, so also gives the extra scroll-bar
    initial: expands the previous scrollbar.
    revert: expands the previous scrollbar.
    ---scroll: the scroll-bars are always there, even when there's nothing to scroll to (at least wouldn't cause the "glitching" mentioned earlier?)
    unset: expands the previous scrollbar.
    visible: (the default) expands the previous scrollbar.
    ----moz-hidden-unscrollable: like hidden (also unique to mozilla, I think?)

    So, (<nothing>), initial, revert, unset and visible are all possible solutions.
    I'm not very good at CSS, so I'd let someone more qualified to tell which is right, but I think that:
    unset, initial and visible are all the same, since it must just leave it to the default, which is visible,
    (<nothing>) and revert are also the same, since it just takes the previous value. Also, since there does not seem to be any "previous" value, these two just point back to the default, which, again, is visible.
    So they are all good, because they simply all point to the same one, which is visible?

    So the answer would either be <div style='overflow: visible;'>, or just... <div>


    (disclaimer: I have NOT tested these things by modifying mafia itself; I only played with the element inspector. Same goes for the post above this one.)

  9. #9
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    Update: inherit seems to also be what causes the cropping in such situations:firefox_rhyg296Gd4.png

    This is the only one that does, so this leads me to think that "auto" is defaulting to "inherit" in most situations, here.

  10. #10
    Senior Member
    Join Date
    Apr 2019
    Posts
    260

    Default

    Ok, I've been trying to help by testing overflow: visible, and I've... had some problems..?
    Code_lO8zsD6d1Z.png

    I compiled a new build in which I made the change I showed, but for some reason it's just... not showing in the actual page?
    Is this the wrong place? This seems like it, though, as it's the only place that succeeds to a div with ID: "content_", and what's before that also seems to match..?

    Is that saved in the Build folder or something? What am I getting wrong here?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •