I have noticed for a while that Joomla´s build in modal popup "sbox" moves the background (the entire body of the site) ca. 10 pixels to the right when I open a popup window. When I close the popup window the page is shifted back 10 pixels to the left.
You can see the problem on this page:
http://www.traelastogbyggemarked.dk/vaerktoj/arbejdsbeklaedning/traesko/euro-dan-pu-finer-toffel-sort-detaljer
Just click on the product image and you can see the background moving.
I have noticed this on other sites aswell, for instance on this page page:
http://demo.joomlaxtc.com/free/index.php/modal-box-plugin
click on the demo link "Click Here"
The problem appears to be present in all browsers. As far as I know the sbox modal popup is a part of Joomla´s build-in mootools core. My site is running Joomla 2.5
Does anyone know how I can change this behavior and stop the modal popup from moving the background?
Check the modal.css and look for this:
/* Hides scrollbars */
.body-overlayed {
overflow: hidden;
}
Try without it.
This should resolve the apparent shift:
/* Hides scrollbars */
.body-overlayed {
overflow: hidden;
width: calc(100% - 16px);}
It subtracts the width of the scrollbar from the element when the class is applied.
Related
I've looked at other posts, but they appear 3-4 years old, and Bootstrap/Popper has many changes.
I have a menu dropdown in Bootstrap 4 that is inside a container with a transform/translate2d on it. When the dropdown menu appears, it is below another container on the page (regardless of z-index) and it flickers a bunch as I move the mouse over it. This occurs in Chrome and Firefox so I think it is related to Bootstrap and their Popper.js use.
If I remove the transform/translate3d on the big container that the dropdown menu is inside of, things work fine.
Here is an example; just click the dropdown arrow to see the overlap issue. Then you an move the mouse over the end of the "Minimum Count" row to see some flickering. If you comment out this CSS line, it works fine.
transform: translate3d(0%, -8px, 0);
https://jsfiddle.net/paultechguy/mtcbLt5t/30/
After much investigation, this was an issue with the "stacking context" for browsers. The Bootstrap 4 / Popper.js dropdown menu does a CSS transform/translate3d and this was the culprit. To solve, make these CSS changes:
Parent element of the container that has the dropdown menu (this is two up from the dropdown menu):
position: relative;
z-index: 10;
Then on the container that has the dropdown menu:
z-index: 20; /* a value higher then the 10 above */
Hope this helps others.
I'm having trouble with an issue on a site -
http://www.Afrifacti.com
I checked for an answer and someone mentioned turning off #footer-container { height: 100%; }, but that leaves an empty box below. http://cl.ly/Tv2I
Basically, I want the image to fill the screen as it does now, but without the scroll bar or empty box below.
However, the scroll bar should reappear if the browser height is shrunk beyond the footer buttons 'about credits join'.
Thanks in advance.
Add at body element (base.css line 12) the style: position:fixed and you done.
I'm calling handleNotableTypeSelect method on the click of the check box, everything is working fine but the page jumps to the top.
this.$hideInactiveCheckbox.click(
this.handleNotableTypeSelect.createDelegate(this));
handleNotableTypeSelect: function(e) {
//e.preventDefault();
if (this.$hideInactiveCheckbox.attr('checked')) {
this.isActive = "^active$";
this.$connTable.fnFilter(this.isActive, 1,true);
}
else {
this.$connTable.fnFilter('', 1);
}
//return false;
}
My case was that the checkbox was hidden (due to CSS design). the original input checkbox had position set to 'absolute' so when the user clicked the checkbox the page "jumped" to the real checkbox position.
EDIT:
In some cases there are styled "fake" checkboxes. the real checkbox element is hidden in some bad practice way.
My case was that the real checkbox element had absolute positioning and hidden and that cause the page jump to top of the window.
Possible solution:
Check if the checkbox element has the following CSS rule
position: absolute;
if yes, removing this rule can fix this issue.
This may related to the following issue:
input checkbox in div jumps to top of page on firefox
I've actually been seeing errors about this in all kinds of frameworks, and for the most part, people post framework specific answers. If you're hiding the check box, try using display: none on it, it seemed to work for the post above. I'm still trying to hunt down a fix (since I'm not hiding my checkboxes, I'm trying figure out why checkboxes in a modal cause the screen to jump to the top of the modal on click).
Several frameworks and css tricks hide the checkbox using position: absolute.
That is correct because we need to hide the checkbox only from screen, while Screen Readers must have access to it in order to announce it correctly. But display:none hides it from them too and users with accessibility issues can't click it.
The most suitable solution is to add position:relative to checkbox container and adjust checkbox position using top: if needed.
If your check box has position: absolute, in most cases just wrapping it (input and label elements) with a div should be enough.
If the checkbox has been positioned absolute to hide it and the interaction occurs on the label (which is commonplace when styling checkboxes beyond the default UI), the page will scroll to wherever the checkbox input is positioned despite the click event occurring on the label. so if you've added top:-9999px; for example, the page will jump right up to where it's now positioned.
What you want instead, is to remove it from the rendered layout without moving it away from the label. to do this, add a container div to the label and input, and add position:relative; to it. Then add the following code to the input itself:
position:absolute;
top:0; left:0;
visibility: hidden;
opacity: 0;
I am using jquery layout plugin and have the following situation that I cannot find a solution. How do I make the center pane increase its size permanently by dragging the div beyond the bottom border.
I have a left pane and a center pane. I dynamically generate div
when the user clicks on the left pane. The divs are generated and
dropped on the center pane. The divs are draggable and resizable.
Everything works fine with dragging and resizing on the visible center
area. The moment I drag the div beyond the bottom, the scroll bar on
the center pane appears and it seems the center pane is extending to
accommodate the new position of the dragged div. But the moment I try
to resize the div or add another div, it jumps to the top section of
the div and resets the scrollbars. I checked the center div height in
firebug and it remains at the same height when initialized
even after dragging the new div beyond the bottom.
Here is the test page html code.
Just copy/paste entirely into a html page. On the left pane, click on the "Add new" button will add new div that is draggable and resizable.
Click on "Add new"
Drag the newly added div beyond the bottom of the center pane.
The center pane shows the scrollbar as it is suppose to.
If you check the center div's height in firebug, it is not changing
Now try resizing the newly added div by dragging its handle
It jumps to the top and the center box loses its scrollbar.
I could not paste the complete html page so here is the reference to the code at the bottom of this thread
http://groups.google.com/group/jquery-ui-layout/browse_thread/thread/ca922aa44c0048ee
And here is the test link http://jsfiddle.net/yZc63/
I am surprised no one has come across this situation before? Even without the layout plugin, my solution is not very pretty. In order to simulate the page without the layout plugin, I had to keep the top and the left pane using position:fixed property in css. And there is no center div at all. I add the new div directly to the body of the html. The reason is I don't want to see additional scrollbars on top the browser scrollbars. In other words the center pane should scroll when the browser scrollbars are moved. I am attaching the solution so you have an idea.
I am open to any solution even without the layout plugin if i can simulate the previous attached file using any other approach. i am attaching my page without the layout plugin but am not sure if that is the only elegant solution left.
You can check the solution here http://jsfiddle.net/c7wrT/
Is adding the dynamic div directly to the html body a good approach?
I ran into same situation and this answer helped.
https://stackoverflow.com/a/33004821/2139859. Updated Fiddle: http://jsfiddle.net/bababalcksheep/yZc63/11/
$(".removalbe-recom").draggable({
appendTo: "body",
helper: "clone",
revert: "invalid",
cursor: "move",
containment: "document",
zIndex: 10000,
scroll:false,
start: function (event, ui) {
$(this).hide();
},
stop: function (event, ui) {
$(this).show();
}
});
I fixed the way the content was being pushed down with using the +position:absolute !important; hack that i've found. But now my question is no matter how i style the top (in the jqmWindow in IE it still seems to popup the window in the middle of the page. In FF however i've gotten the page to be more towards the top. The reason why i need to move this jqm window is that there is more info on the div (jqm) then will fit on the screen. Is there a way just to make the window a certain size and have scroll bars on the side if the content is larger? Thanks for the help.
you should be able to wrap the contents of the window in a div and set it's height, as well as overflow
div.wrap{
height:220px;
overflow:scroll;
}