I'm facing a problem with firefox versions < 3.6 and I'd like to get a fix for that.
My issue is update_panel related, but I couldn't find any information on similar issues and can't really name the problem as it occurs rarely ( and not on localhost) :
"the updatepanels freezes and doesn't react"
My problem is that I cannot identify the problem and thus would like to switch the updatepanel to work with full postbacks (standard is asnyc) when I detect firefox + ver < 3.6
My question is basically, how to "disable"/set the updatepanel to do full postbacks only in this case ? Both codebehind and serverside solutions are acccepted
System.Web.HttpBrowserCapabilities browser = Request.Browser;
double versionb = 3.5;
if (browser.Browser == "Firefox" && Convert.ToDouble(browser.Version) <= versionb)
{
}
Solved this by removing and adding new PostbackTriggers at Page_init.
Related
I am using a kendo multi-select of version(2015.1.521). It is located in the lower side of the page. Widow size is increasing after selecting items. After removing some item from option using x icon, multi-select does not open. Is there any solution?
dojo
I have got a workaround where I am checking for active element.
Solution dojo
$("#required").kendoMultiSelect({
autoClose:false,
close: function (e) {
var activeElement = document.activeElement.getAttribute('aria-owns');
var currentId = this.tagList[0].id;
if (activeElement != undefined && activeElement != null && activeElement.includes(currentId)) {
e.preventDefault();
}
}
});
I was able to reproduce your problem. On the other hand, I wasn't able to reproduce it with a current version. That tells me, that it must have been a bug which has been fixed in the meantime.
The only way I found out which fixes the problem for me at 2015.1.521 is to refresh the Widget, once the problem occurred.
$("#required").data("kendoMultiSelect").refresh();
Now the question is, how do you know (programmatically) that you are in that error-state? Maybe you could refresh it on a regular basis. Until you upgrade to a newer version, it's going to be a workaround.
I'm using SignalR (2.0.0 then 2.0.1) to make some real-time web application. Every 5 seconds it receives some data... Also process user events. Anything works, but i have problems with IE8 (same with any version if IE + compatibility Mode).
var worker = $.connection.mainHub;
...
worker.client.test= function () { ... };
var connection = ((navigator.userAgent.match(/iPad/i) != null) ?
$.connection.hub.start({ transport: ['webSockets', 'longPolling'] }) :
$.connection.hub.start())
.done(function () { console.log($.connection.hub.id);});
1) The first one: after ~1-2minutes of working - everything became slower(user events like pressing buttons, simple css hover action, etc.), IE seems to be dieing.
I thought the reason is memory leak.. it's a large amount of JavaScript (I'm using knockoutjs to build my html). But now i'm not sure
2) I need to have some clarity, how should I reload the page.
I'm using "location.href = location.href;" and everything fine, but in IE it seems to cause an error.
Not always, but often there is an error "$.connection.hub.id is undefined". I check $.connection.hub.transport, it's undefined too. Have no idea what i'm doing wrong...
it seems there was redirecting to other page at the moment of 'done' occured. jquery.signalR stayed on the other page.. I guess there is some specific of brouser cash
I am developing an application using Phonegap for Windows Phone 8.
I've used jQuery Mobile for interface design.
the $.mobile.changePage() is not working. The page is not being changed.
Is there any other way to change the page? Is there any other framework to design the interface for mobile?
$("#btnSearch").bind('click', function() {
showSpinner();
$.mobile.changePage("#pageSearch");
});
I think this problem is the same as in WP7 described here.
CHECK FOR PATH PROBLEM:
if($.mobile.path.getLocation("x-wmapp1:/app/www/index.html") != "x-wmapp1:/app/www/index.html")
{
console.log('there is path problem');
}
else
{
console.log('everything is OK with paths');
}
SOLUTION:
As described in github, problem is path on WP7 differs from other platforms. Basically on WP7 getLocation prints relative paths with double slashes, which causes this issue at first place. To fix, open jquery.mobile-1.3.1.js and refactor following:
- var uri = url ? this.parseUrl( url ) : location,
- hash = this.parseUrl( url || location.href ).hash;
+ var uri = this.parseUrl( url || location.href ),
+ hash = uri.hash;
and:
- return uri.protocol + "//" + uri.host + uri.pathname + uri.search + hash;
+ return uri.protocol + uri.doubleSlash + uri.host + uri.pathname + uri.search + hash;
After making this changes, check should display "everything is OK".
PS This is tested on WP7 and totally fixed my issue with $.mobile.changePage().
PS2 This issue is fixed at github version of jQuery, although I've just checked latest stable version(1.3.2) and unfortunately it is NOT fixed there.
Regards,
Hristo Todorov
I did have the paths problem mentioned in the answer above, but this didn't solve my problem. I discovered after a lot of trial and error that it was the protocol on the begining of the URL that was causing the problem.
A change page for "mypage.html" will send an Ajax request for
x-wmapp0://www/mypage.html
It needs to be just
www/mypage.html
I made a modifcation to the jQuery Mobile source to manipulate the string to cut off the protocol and now it works perfectly.
To apply the fix, in the un-minified jQuery Mobile js file, search for "$.ajax" and add the following just before it:
var parts = fileUrl.split("www/");
fileUrl = "www/" + parts[parts.length-1];
This actually removes "x-wmapp0://www/" and puts the "www/" back on again. Removing just "x-wmapp0://" does not always work because of the way jQuery Mobile works with urls, resulting in "www/www/..." in some cases.
This is confirmed to work with Cordova 3.1 and 3.3 with jQuery Mobile 1.3.2
I think the method was renamed to "pagechange"
http://jquerymobile.com/blog/2011/09/08/jquery-mobile-beta-3-released/#upgrade
I get the error above when trying to press the "add" button on the integration test I am trying to implement. I thought that was a delay with the javascript, and I tried the following, but none of them worked:
Then /^I should click "([^"]*)"$/ do |selector|
# if page.should have_selector(selector)
# find(selector).click
# end
# page.execute_script("$(#{selector}).click()")
find(selector).click
end
I tried all of the above, but that didn't solve the problem.
This is hardly a great answer, but I'll give it anyway...
I've only ever seen this problem when testing with Chrome. There are two solutions that worked for me:
Use Firefox instead of Chrome
Instead of find(selector).click, use page.execute_script("$(#{selector}).click()")
But since you've tried the second option and it didn't work, try using Firefox instead. Sorry :(
I found resizing the browser window made a similar problem go away:
Given(/^I open a new browser window$/) do
Capybara.current_session.current_window.resize_to(1000, 1000)
end
I was getting the same error in Capybara when trying to click_button a 'Save' button at the end of a page. Scrolling and bringing the element to view using JS proved to be an effective workaround.
def scroll_to(element)
script = <<-JS
arguments[0].scrollIntoView(true);
JS
Capybara.current_session.driver.browser.execute_script(script, element.native)
element # return the element
end
scroll_to(
find(:xpath, '//button[text()=\'Save\']')
).click
Update
For me, it turned out to be a mismatch between the version of installed Chrome and Chromedriver and no code change was necessary after all.
Chrome 61+ includes modifications to scrolling behaviors. A quick examination of Chromedriver page revealed that I had to upgrade my Chromedriver (from 2.29 to 2.32) in order to make the driver compatible with those changes. This was part of the Chromedriver 2.30 (Supports Chrome v59-61) release notes:
Fixes a bug where Chromedriver fails to click due to page scrolling changes in Chrome 61+.
I had a sticky header that was preventing Selenium from sending the click to the right radio button on both Chrome and Firefox (though Poltergeist worked fine). This is a hack to delete all fixed elements (like sticky headers), and it worked for me:
def kill_sticky_headers
# https://alisdair.mcdiarmid.org/kill-sticky-headers/
script = <<-EOS
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();
EOS
page.execute_script script
end
I was facing a similar problem where I have to check two check boxes one after the other. But I was getting the same above error, hence I added a wait in between my steps for checking the checkboxes. It's working fine and great.
Here are the steps:-
When I visit /administrator/user_profiles
And I press xpath link "//*[#id='1']"
Then I should see "Please wait for a moment..."
When I wait for 5 seconds
And I press xpath link "//*[#id='2']"
Then I should see "Please wait for a moment..."
When I visit /administrator/user_profiles_updates
We are using java ajaxtags as a library to populate auto complete values for textbox. It is working perfectly in most of the browsers (Firefox, ie6, ie7 etc...).
But in case of IE8 the position of auto complete results are not linked with the actual textbox, instead it is shifted towards down. It is happening only in IE8.
Please suggest a solution to resolve this issue and to be able to the display auto complete results in a proper way.
Thanks for your help in advance.
Found the solution myself...
In control.js file I have added the following condition to get it worked
if(!update.style.position || update.style.position=='absolute') {
update.style.position = 'absolute';
// Adding the following condtion will fix the issue with IE8
if(navigator.appVersion.indexOf('MSIE')>0) {
update.style.display = 'inline';
}
Position.clone(element, update, {setHeight: false, offsetTop: element.offsetHeight});
}