I am using knockout and Jquery Mobile together (with external templates) which is quite painful, however I have got the majority of it working, but I keep getting a strange issue where if I load a page with checkboxes with data-role="none"
it works fine, but if I go to another page then come back it blows up with a dom exception.
After some routing around it seems that the DOM error is because it doesn't have a label associated with it, however this is true as it is more like a table with multiple rows of elements with a shared heading at the top.
I am not sure if it is adding to the problem, but due to me loading the container for this collection of elements via an external template (ajax request) it contains a custom data-bind
which calls $(element).trigger(<trigger-var-here);
so data-bind="trigger: 'create'"
would call $(element).trigger('create');
, so I am not sure if Jquery Mobile is somehow re-triggering the data-bindings every time you swap pages, but it is a nightmare and can find next to no information on this...
I could put up with the error if that was just it, but I lose all themes on content when I swap between pages making me think something odd is going on.
The error is below:
Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild] [Break On This Error]
...:this.options.theme,icon:p,shadow:false,mini:f});f=k.createElement("div");f.clas...
jquery....min.js (line 109)
The thing which is odd, is if I remove the checkbox it all works fine, but the data themes keep getting lost between transitions, but the controls remain working. If I start on the page with the checkbox it works fine, however if I start on another page THEN click the button to take me to the page with checkboxes the error occurs.
User contributions licensed under CC BY-SA 3.0