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.
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)?
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
I'll let somebody who uses (has ever used) the CAB investigate this.
I have literally never seen this using KoLmafia's Stationary Buttons.
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!
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.
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:
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.
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.
I seem to have found a solution.
The problem gravitates around the fact mafia toggles the table's "visibility" when hovering over it.
This problem is "solved" (leaving space for doubt, in case it secretly breaks something) by having it toggle it's "display":
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 ).
The intraneous scroll-bar itself is directly caused by line 319 of StationaryButtonDecorator.java
which adds <div style='overflow: auto;'>
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.)
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.