Remove ScrollBars on GlideDialogForm

jeremyeperdue
Giga Expert

How can I remove the vertical scroll bars on a GlideDialogForm?

1 ACCEPTED SOLUTION

Venkat and others that helped,



I think we will live with the scroll bars. I was really hoping for something like .removeCloseDecoration()



ServiceNow advises against DOM Manipulation and after a few issues caused by the changes in Geneva (like labels going to legends), I am reluctant to pursue this. Also, this is for an integration. So when the integration upgrade happens we may see issues or they may have addressed this.


Thank you,


Jeremy


View solution in original post

11 REPLIES 11

How would this code fit in here? I am not familiar with the setLoadCallback function. I see that I already have a setLoadCallback function, would I just add the jQuery line under it? IE Take your line 4 and place it at my line 18?



find_real_file.png


venkatiyer1
Giga Guru

Hi Jeremy,



You can place the following code after line 24 above. It should work.


$j("#dialog_frame").contents().find(".touch_scroll").filter(".section_header_content_no_scroll").css("overflow", "hidden");  


I really appreciate you taking the time to help me Venkat. I added the line, and same result as the screenshot I posted above. Checked the logs and I do not see any error messages.


Hi Jermey,



In addition to Venkat's input, I would advice using "overflow: auto" in-place of "overflow: hidden".


It's possible on the small screen that content may not fit well and content could be clipped because of "overflow: hidden". Keeping "overflow: auto" would help you show the scrollbars when they are really needed. When there is enough space available on the window, it would not display the scrollbar.



Thanks,


Manjul


Hi Jeremy,



$j("#dialog_frame").contents().find(".touch_scroll").filter(".section_header_content_no_scroll").css("overflow", "hidden");



In the above code, may be you can ensure you select the gsft_main frame in developer tool bar of your browser and then console.log   $j("dialog_frame") to see if you get a element and then traverse each step till find to get touch_scroll class elements. The reason i want to debug is to ensure that our dom manipulation is getting applied.



Overflow =   auto   - would have been a good choice generally but in your case since we are not re caliberating the height and width after load of window it will always tend to have scroll bars. Hence you would have to apply the hidden value.