How to make a method that will trigger at the event of overflow? - html

I have a dynamic table in .html that reads the data from the database to display all the elements, and they can obviously fall out of bounds when they reach certain amout.
I don't want to use scrollbar, but instead I want a box to appear if there are elements out of view, just to make it clear that you can still access them despite the lack of scrollbar.
Is there some Angular functionality that can help me with that?

Related

prevent CSS overwritten by site stylesheet

I know there're some threads regarding the following issue but I didn't find anyone that suits me.
I'm trying to create a chrome extension that creates a dynamic table inside a div.
The div fills the whole window and the table is being position at the top right corner. Another important thing - the table is draggable. Till here all is good.
Unfortunately on some sites the tables ui looks a bit different due to css overwritten.
Most of the solutions suggest the use of iframe, now because of the drag-and-drop and that iframe consume all the mouse events I cannot use them.
Any other suggestion would be great!

Dynamic continuous form height

I currently have a form that has a continuous subform in the footer to show "comments" for the original form record.
My issue is that each comment is of an undetermined size. I am trying to find a way to dynamically change the height of each section in the continuous form to match its contents.
Reading around online I found a lot of people saying this couldn't be done (a few years ago, so whether this is still the case I am not sure) so I tried instead to layout my own "continuous form" in the form header of the subform. This involved creating a text box for each comment using the CreateControl method. Unfortunately this method didn't work either, the new controls completely failed to appear on the form at runtime.
I am sure there is some way this can be done (maybe an alternative method to achieve the same effect) but I can't seem to find it.
Anyone had experienced with this problem or any ideas on how else I may achieve the desired result?
Each record in the subform will always be the same height (the Detail section height). What I've done in the past is to make it fairly small but add a button (or use the Click event of the text box) to open the Zoom box with the whole commment.

HTML5 Drag and Drop Without Changing the Markup

I imagine that the answer to this question is no, but just in case I'm going to ask it anyway.
I want to use know if it is possible to use html5 drag and drop functionality without adding markup to the html (i.e., without adding draggable="true".
The reason I'm asking is because I want to use this within TinyMCE but I do NOT want to publish to the front end dragabble="true". I only want the drag and drop to function in the backend.
Any ideas?
P.S. I imagine I could see if there is a filter within TinyMCE for when the content actually gets published to the front end, but I would first prefer to see if it is possible to do this without a filter.
These things are draggable by default (ie. without any kind of attribute):
Links
Images
Selections
If you can make everything you want to be draggable be one of those things then you're OK, you just have to handle the events in the normal way. The easiest ways I can think of are:
Absolutely positioned images as 'drag proxies' (if they're absolutely positioned then they'll be out of the document flow)
Automatically select text on mouseover
However, I think it would be far more simple to add and remove the draggable attributes dynamically, eg. with jQuery (perhaps in the save event of TinyMCE):
$('#editor *').removeAttr('draggable');

html - controlling how many options show in a select element

So I have a drop down (select) element. The problem is that if there is a long list in it, then it "drops" upwards instead of downwards.
Is there a way to say that it should scroll rather than show all of them at once?
I know there's "size" but that's how many are visible at once (I only want one visible, like normal)
Or is the reason it's not having a scrollbar automatically caused by it's containing div? Does it need to know where it should end or something?
The way this works is up to the browser. Nothing you can do about it, other than building your own drop-down with JS.
The problem is not the list size, it drops upwards or downwards according the size above or below to always show the entire list if possible. It's a comprehensive behaviour and I don't think (and I don't want) you can change it.

generically detecting html position changes using jquery?

I'm using the excellent BeautyTips plugin as a means of indicating validation failures to end users and I'm running into positioning problems whenever page content is dynamically added, removed, or animated.
Here's a concrete example. I have a DIV at the top of each page that’s used for confirmation/error messages. It's displayed in $(document.ready) using slideToggle(). This naturally "pushes" all subsequent html content down, throwing off the positioning/alignment of the beautytips. If I call the plug-in's built-in refresh method after slideToggle() has fired, said positioning problems are corrected. You can see the before/after screen-shots here and here.
One possible workaround would be to programmatically detect DOM changes, specifically changes to css, so that I could then loop over each beautytip and manually reload it. However, it appears that there are no native jQuery events which expose such functionality. I've seen the impressive jQuery plug-in by Rick Strahl that monitors CSS changes, but it seems based on the assumption that one knows ahead of time the specific HTML element(s) they wish to monitor. I want to monitor the entire document, since I can't be expected to know what html elements might exist on a given page that a) are going to be animated and b) would be at such a position in the document that they would "push" down the my beautytips. And I certainly don't want to have to incur the massive performance penalty of polling every block level element in the document.
I should mention that the plug-in works perfectly if I use it in its default "hover" mode in which beautytips are displayed only in response to user mouse input. Unfortunately, there is a design constraint imposed on the application that states all validation errors must be displayed after form submission without additional user interaction.
I'm sure there's a really simple/elegant fix that is completely eluding me. I could avoid all of this hassle, of course, by simply not using animation to display page content, but that seems like a high price to pay.