Material Design Lite page resetting to page top when loading - material-design

I have a page using Google's Material Design Lite framework. If you start scrolling before the page loads, the page will snap back to the top once the page finishes loading.
This happens on many of the MDL sample sites too. Here's one example - https://getmdl.io/templates/android-dot-com/index.html
How can this effect be removed?

Related

Custom SharePoint Responsive Master Page

We had a responsive html that was made responsive using bootstrap. Using Design manager i created a master page from it. Every thing works fine except 2 things.
Global Navigation doesn't match the UI, So i have applied all bootstrap classes using jQuery. Menu seems good later but at time of loading it looks bad.
When i go to add an app page, It shows only 4 apps. Search over there is not working as well as "Apps you can add" option is not visible on the page.
Can you provide exact steps that are to be followed in order to get it working fine?
For the part of question related to global navigation what you can do it in two ways.
Hide the global navigation using css first. Apply the bootstrap classes using jQuery and then show it on page to avoid loading effect.
Try to pull global navigation data using REST and generate html and append it on page using jQuery. Try this link : https://sharepoint.stackexchange.com/questions/116393/get-links-from-sharepoint-2013-global-navigation-using-rest

Browser Page looks messy

To develop websites I use domino designer v9.01 with OpenNTF Bootstrap extension library v14. I am new to IBM domino so have mercy …
The trouble I have is : While previewing XPage apps in Notes all controls, views etc. are there and looks as expected. But when I preview same XPage apps in a web browser (newest FireFox, newest Microsoft Edge) I get messy results. To be more specific, the amount of controls, views, etc. are there and they also work. But their expected design is messy. I cannot describe it better because I have never seen such pages before.
Finally the question is : Why is the presentation of XPage apps in Notes perfect while in a web browser not ?
UPDATE
Here are 2 screenshots to visualize the problem. First screenshot is from Notes showing expected UI. Second screenshot is from FireFox browser showing non-expected UI which i call "messy". The content you see is a simple example from a tutorial. So do not wonder about that.
The Extension Library plugin will also need to be installed on the server as well as into Domino Designer. The usual process for this is using an UpdateSite database, as documented here http://www-10.lotus.com/ldd/ddwiki.nsf/xpAPIViewer.xsp?lookupName=XPages+Extensibility+API#action=openDocument&res_title=XPages_Extension_Library_Deployment&content=apicontent

SWT Browser component blocks SWT UI thread

I am embedding an org.eclipse.swt.browser.Browser into a view in a modified eclipse (Indigo), for use as a preview pane of a form editor component. On a form model change or an element selection change the code renders the form via vaadin 6 and displays it in the browser component.
Now, this works like a charm in most cases. But for some highly complex forms the HTML+JS generated by vaadin generates a lot of stress on the browser, rendering it unresponsive for up to a few seconds. That in itself wouldn't be tragic (1), but as long as the SWT Browser component is busy rendering that stuff, the entire eclipse UI thread is blocked.
A simple way to reproduce this is to create an HTML page that blocks inside a javascript function (see https://gist.github.com/creinig/5150747 for an example) and display it in the SWT browser. As long as that JS function is running, the entire SWT application is not responding to anything.
The only info I've found on this problem are
one SO question (without resolution) and
one question on EclipseZone (unanswered).
Not that helpful :(
The API docs of the Browser component don't seem to offer any insight on whether its rendering is triggered periodically by the UI thread or if itself triggers something that blocks the UI.
Is there a way to decouple the Browser component's rendering from the SWT UI thread? Or anything else that could be done to protect the eclipse UI from hanging stuff in the browser?
(1): We need forms of this complexity level, we're already optimizing the rendering performance and a switch to vaadin7 will most likely also speed things up. But the problem will certainly persist, if only in reduced severity.
Not a real solution, but a workaround that Works For Me (TM):
As described here it is really easy to launch the system's default browser from SWT. So I'm going to add an option to the view containing the browser control that will "detach" the view by disabling the browser control and opening the system browser instead.
In case the linked page drops off the net, here's the gist:
org.eclipse.swt.program.Program.launch("http://my.funny.url/");
launches the application registered for HTTP URLs. In other words: the system default browser.
Happiness ensues :)

Load a webview in the background

I have a tab bar application and when it starts up there are web views on different tab bars. The app needs speed so when someone opens and it loads onto the first tab bar I need the other web views in the background to load when the application starts. One of my UIWebView's is named twitter and it is on the 'SecondViewController'. I assume the code is in the appDelegate, help is much appreciated in a basic form for my knowledge isn't great.
UIWebViews can't be rendered offscreen. The best you can do is cache an image of the content the last time it was accessed and present that, then load the web view and cross fade between the two.

How should I go about rendering a webpage without using a browser?

Basically I am currently doing some research, and I am interested to find out how I could render web pages without a browser: I have some algorithms that I would like to run to calculate the visual aspect of each blocks of DOM node(s) for each page.
What you're asking for basically, is a browser rendering engine, otherwise known as a layout engine... For example, Firefox uses the Gecko layout engine to render the pages. Theoretically, you could adopt this engine for whatever project you're working on, saving you a lot of time.
The Gecko engine is used in more projects than just Firefox, and since it's open source, you could easily get the source code and try to throw it in an application.
Wikipedia has a nice list of layout engines, so there are other alternatives to Gecko, like GtkHTML.
Basically, you want to create the data structures a browser internally creates so that it knows how to render the page.
Check out the Firefox source.
I suspect it's rather complex.

Resources