Calling .trigger('create') causes JavaScript error - jquery-mobile

I have this weird issue with jQuery Mobile that only occurs on page refresh (e.g. by pressing F5).
On the page in question, within the 'pageshow' event, the following is called:
$('content').html(details.html).trigger('create');
This works perfectly fine when the page is navigated to, but once you stay on the page and refresh, the styles aren't applied and the following error appears in the JS console:
TypeError: c[0] is undefined
However, if I push the .trigger('create') into a setInterval with a value of 1, it still throws the error but applies the styles correctly:
$('content').html(details.html);
setInterval(function() {
$('content').trigger('create');
}, 1);
Obviously this isn't ideal, so I was wondering if anyone has come across a similar problem, and if so what they did to fix it?

Related

Vaadin 23 TypeError: error loading dynamically imported module

In Firefox browser, not always (but very often) I see the following error in the console (and page is unable to load):
TypeError: error loading dynamically imported module
Only after Ctrl + F5 the page is loaded correctly.
Also in the Network tab I may see the following:
Uncaught (in promise) TypeError: error loading dynamically imported module router.js:525:10
ready router.js:525
(Async: promise callback)
render router.js:517
__onNavigationEvent router.js:932
setRoutes router.js:419
index.ts:32
There is no any other information. In Chrome, everything works fine. What may be the reason of this issue?
I noticed this after upgrade to Vaadin 23.2.1
Also, from time to time I have the following error:

For what reason can an error occur periodically in the client-side?

I have a Rails application that has several components written in Vue. All components are included in the "pack" file.
These two errors occur periodically in the browser (Safari):
SyntaxError: Unexpected token '|'
TypeError: Object(i.a) is not a function. (In 'Object(i.a)()', 'Object(i.a)' is an instance of Object)
The first error points to this line:
<meta name="csrf-token" content="qRbwC3xngly9Y5hRVLA86upHTEkVwIk10PiOtDWCw00RUkIhGK8UvEIhtUXebkzWaqlxsHPSBaheR1moaY-b9w"/>
I don't understand what the second line points to. The error refers to some function "c" in "node.js:15".
Clicking on it jumps to the comment:
In general, I do not understand what it is.
If reload the page, then everything will be fine. Well, that is the problem occurs randomly.
On the Sentry side, I get nothing. Apparently, this does not reach Sentry, the error is not caught and is not transmitted to Sentry.

Issue with orbeon forms

I have 2 issues in orbeon forms. first the attachments are not working Im getting the below error while attaching files
"A Submission error parse error occured"
but there are no errors on the console of browser please find the screen shot
clicking on calendar gives the below javascript errors only on IE
SCRIPT5007: Unable to get property 'value' of undefined or null reference
SCRIPT5009: 'console' is undefined
are there any fixes for this attached screen shots and JS code snippet
{this.lastError=D;if(A){throw D;}}}return B;},unsubscribeAll:function(){var A=this.subscribers.length,B;for(B=A-1;B>-1;B--){this._delete(B);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(A,B,C){this.fn=A;this.obj=YAHOO.lang.isUndefined(B)?null:B;this.overrideContext=C;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var G=false,H=[],J=[],A=0,E=[],B=0,C={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},D=YAHOO.env.ua.ie,F="focusin",I="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:D,_interval:null,_dri:null,_specialTypes:{focusin:(D?"focusin":"focus"),focusout:(D?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(Q,M,O,P,N){var K=(YAHOO.lang.isString(Q))?[Q]:Q;for(var L=0;Lenter image description here

undefined method "#searchServices" rails and jquery

I have a search box in my app in which every time you search for a service the blow function runs and its not working I have an error
I get errors on this specific line
$("#searchServices").autocomplete({
$(function() {
$.get("/services",function(data){
$("#searchServices").autocomplete({
source: data,

Watir : Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus

I'm new to watir and currently using it for automating an application , however I'm stuck at one error when I try click a button.
Watir code looks like this :
$browser.button(:id,"Button_one").click
html for button looks like this:
<input id="Button_one" class="ButtonA ButtonB" type="submit" value="Continue">.
error displayed is:
WIN32OLERuntimeError: (in OLE method `focus': )
OLE error code:800A083E in htmlfile
Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
HRESULT error code:0x80020009
Exception occurred.
Ruby192/lib/--/input_elements.rb:294:in `method_missing'
Ruby192/lib/--/watir-classic/input_elements.rb:294:in `set'
Button does not seem to be invisible, disabled.What can be the reason for this error?? pls let me know how to deal with this ....
Try this:
$browser.button(:id => "Button_one").when_present.click

Resources