I have a popover that works perfectly fine with Safari, Chrome and IE but doesn't work in Firefox, (it doesn't appear).
I have created a jsfiddle to illustrate the problem:
https://jsfiddle.net/sregorcinimod/7x4vuwLr/8/
When you click on the blue rectangle a popover should appear.
The problem line is the fact that i have a position:absolute on the svg
#spacing svg{
max-width:100%;
position:absolute; //this is the line that is causing issues
bottom:0px;
}
If I remove that line the popover appears but I need that in for other things.
The constraints are:
I need to have position:absolute on the svg due to other more complex things that aren't in the jsfiddle i.e. responsive positioning of multiple layered svgs.
I need the trigger to be focus and not click because I need the popover to be dismissed when the user either clicks on the x in the title or anywhere in the browser window.
Things I have tried:
wrapping the svg in a div.
changing the container.
Add a tabindex attribute to the rect e.g. tabindex="0"
Related
Is it possible to prevent a uiwebview from scrolling around, but to also have a div that can scroll?
I have a jquery navbar and want a scrollable div underneath with many images. I'd like to be able to scroll through the images while the navbar remains fixed.
Initially the whole webview was moving around so I used this to stop all scrolling.
webView.scrollView.scrollEnabled = NO;
but now I want the div to still be scrollable.
I have the div style set to
overflow:auto
but it does not seem to move.
I had the wrong div set to overflow:auto.
So it worked after setting the correct one to scroll.
I have tried to change the default arrow in drop down.
By adding this in css,
background-image:url("downArrow.jpg") no-repeat scroll right center transparent;
but the default arrow of drop down is not get replace in firefox, but in chrome its coming correctly.
How to fix this in firefox. Thanks in advance.
<SELECT> elements are not rendered by HTML, they're rendered by the browser/OS and styling them is quite limited. You cannot replace the arrow. All you can do is place an element on top of it and use script to fire the click as if it were part of the real drop-down.
I am using TextArea tags in my web project, that shall never show scrollbars.
This can easily be accomplished using
TEXTAREA { overflow: hidden }
All browsers that I need (IE, FF, Chrome) hide the scrollbars, as intended.
However Internet Explorer and Chrome will scroll to the current cursor position anyway, while Firefox does not scroll anymore at all. You can move the cursor into the invisible area and type, but you will not see, what you are doing.
Can this be solved?
Regards,
Steffen
EDIT: Because I have not found the source of the problem and I would really like to solve this, I leave this question open. However I found a really bad workaround: We now use overflow: scroll on that TEXTAREA, put it into a DIV, measure the width and height of the horizonal and vertical scrollbars, increase the size of the TEXTAREA by that values and set overflow:hidden to the DIV effectivly clipping away the scrollbars. They get invisible to the user but Firefox still scrolls. Not nice but working.
As far as I can tell, Firefox is behaving as I'd expect given the semantics behind overflow:hidden.
That said, and having read your comments above, you can quite easily mimick the behaviour you want with a small bit of jQuery.
Here's the code I've written:
$('textarea').bind("focus keyup", function(){
var $current = $(this);
$current.scrollTop(
$current[0].scrollHeight - $current.height()
);
});
This will basically scroll the textarea to the bottom when you focus on it and as you type. It may need tweaking to account for edits being done further up in the content.
Here's a Working Demo
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;
}