I have a login page which loads just fine when above 767px wide and crashes the browser below that width. It only crashes when loading below that width, I can load at desktop width then size down just fine.
I have one div with .visible-desktop that contains the desktop login and superfluous stuff and another with .hidden-desktop containing only the mobile login. An image in the superfluous stuff is currently 404'ing. I'll fix it but it sure shouldn't be crashing the browser.
In the server console, the asset previous to the 404 asset loads and nothing else happens. In the browser, the page becomes unresponsive and crashes. Chrome just crashs and FF says
A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
Script: http://ccdev:3333/assets/jquery.js?body=1:6265
Update:
Using firebug and inserting a breakpoint on line 6348 in jquery v1.8.2 and stepping through it seems it's stuck incrementing something called elems. On one step the value will be something like "<li><a>177085</a></li>", on the next it will be "<li><a>177086</a></li>" and it never leaves that line. The line in question is
div.parentNode.removeChild( div );
This turned out to be an issue with Woothemes flexslider. jQuery can not remove items hidden by bootstrap. If loading the page at a width where flexslider is hidden, jquery has an infinite loop which will cause the browser to hang and crash.
I found the fix here. Just initialize flexslider with minItems: 1. Which should really be the default!
Related
I've created a simple blazor app that has a slider on top. There is a javascript self executing function that adds some inline css to this slider so it makes its' height the same as window.height.
I'm adding this javascript file in _Host.cshtml, before closing the body tag.
My issue is that this inline styling isn't applied. I've debugged the javascript code and it gets the correct height, the element on which I want to add the styling is found, the element.css('height', myHeight) is being called with the correct value, but in the end there is no style attribute on that element. I've also tried, after the component has been rendered, to remove the script tag from the page and add it again, hoping that it will re-run and then change the height, but no success there as well.
I've created a .NET Core WebApp using that same slider and everything works as expected (I have the style attribute on my element). In this second app I add the script before closing the body tag, in _Layout.cshtml.
Seems preety much the same as the blazor app, but for some reason, on that one doesn't work.
Do you guys have any idea why?
EDIT:
I've found something interesting. In the beginning, the page is loaded correctly, but the component is being reloaded after the app connects to the we socket Information: WebSocket connected to wss://localhost:44361/_blazor?id=cepYgPnJYddq2bHSywwwYw.. This is when I lose the inline styles.
So how can I stop it from reloading? I guess this is the question.
I have a single page web app. The keyboard pops-up everytime I click on the screen.
There are no text input boxes in the DOM at all.
How can I debug why the keyboard is popping up.
You can see examples of this strange behaviour at https://blight.ironhelmet.com and https://np.ironhelmet.com
update with a clue: A user is now reporting that rather than the keyboard, a dropdown selection spiner is popping up all the time, long after that dropdown has been removed from the DOM.
For React users:
I had the same thing happen in a React single-page app with React-Router. I didn't write code to remove elements from the DOM, but of course React does that for you.
On my site, there are React components that contain one to four input fields. After any such component appears, and then is hidden (unmounted / not rendered anymore), then any time the user taps a link, the keyboard pops up. This makes the site unusable. The only way to make it stop was to reload the page.
The workaround: calling document.activeElement.blur() in componentWillUnmount for the wrapper component around my <input> fields did the trick.
componentWillUnmount()
{
if (document && document.activeElement)
{
document.activeElement.blur();
}
}
Note that calling window.activeElement.blur() did not seem to do anything.
There's a thread in the Apple support forums about this issue:
https://discussions.apple.com/thread/7692319
Looks like the keyboard was holding a reference to input after I had removed them from the DOM.
I added a test when removing element to see if it was the current activeElement, then, if so, calling document.activeElement.blur() before removing it. Seems to have solved the problem so far.
We have got following logic on frontend - so when new page is loaded, screen is auto scrolling to specific section and I have a script which clicks on the specific element at that time. Hence, while this movement is occurring following error is appearing due to the fact that selenium is clicking on wrong element:
"Element is not clickable at point (x, y). Other element would receive
the click..."
I have added plain sleep, but this solution is not a good one. So does any one know how to wait until page freezes - when auto scrolling is finished?
f you know what element you're scrolling to (the element that is at the top of browser viewport when you're done with scrolling) you can wait for the y property of a navigator representing that element to equal zero. Following is an example that you can paste into groovy console which goes to a page and then scrolls to an element by using it's id in the url (I know there is no waiting here nor the scrolling is animated but I just want to show how that property can be used to achieve want you want):
I am not familiar with protractor, so you will have to adjust the block syntax appropriately.
waitFor {
elementWeScrollTo.y == 0
}
I am using QWebPage to download some pages, including the js rendered content. But I found that sometimes, there is some js missing. The content which should be replaced by js rendering result remains empty.
I check the document for QWebPage, I guess I got the answer, “Finally, the loadFinished() signal is emitted when the page contents are loaded completely, independent of script execution or page rendering.”
But how can I wait until all script rendering finish.
I recently by accident found an issue I have with a web application I have made entirely with dojo.
I have a TabContainer and a toolbar with buttons and each button adds a Tab in the TabContainer.
Each of these new Tabs has as children, created programmatically, one or more of the following BorderContainers, ContePanes, Editors, FilteringSelects, Uploader and Buttons. I should point out that I do not have parseonLoad: true byt false and I call manually the parsers.parse when required. I should point out that in the ContentPanes in the content attribute I put also declarative filteringSelects and ValidationTexts and Uploader I hope that is not a problem.
Everything is working great in all browsers even in IE9 besides one thing in Firefox 12.
When I create many new tabs and the ScrollingTabController gets created (The left/right and dropdown arrows of the tabstrip) when I use the ScrollingTabControllerMenuButton (the down arrow at the far right) the TabContainer behaves wrongly and eventually freezes. Firebug shows weird errors when I select different tabs via this menu of the tab strip. Errors of the buttons that I have in these tabs, weird errors mentioning StackController or ScrollingTabController
[ e.g.
button is undefined
if(this._selectedTab === button.domNode){ StackController.js (line 222) ]
different each time...
This weird behavior only happens in Firefox. IE9 and Chrome do not have any issue at all!
Could anyone have an idea on what might be the problem? Is it a known bug? Is it a problem that I have many widgets in each Tab ?
It seems that it is indeed a browser specific bug and as I was told it should be fixed in the following releases
I first reported it to the dojo community and from there they reported it to the Firefox team
http://bugs.dojotoolkit.org/ticket/15496