or
To fix these issues i came up with some event handlers that can be easily attached to your autocomplete setup script plus two lines browser specific of CSS code.
JS Autocomplete setup code:
$("input.autoComplete") .kendoAutoComplete({...}).focusin(function () { //If IE the placeholder will be hidden, but typed text
// would be in the placeholders colour, so change it here to your normal
// input color if ($.browser.msie === true) { $(this).css('color', 'black'); } }).focusout(function () { //If IE and the value is empty, the placeholder will be shown;
// make sure it has the right colour if ($.browser.msie === true && $(this).val() === '') { $(this).css('color', '#6d6d6d'); } }).ready(function () { var el = $("input.autoComplete"); var value = $(el).val(); if (value !== $(el).data('kendoAutoComplete').options.placeholder) { //every browser except IE return empty value if input is empty
// but placeholder is shown if (value !== '') { $(el).css('color', 'black'); } } else { //if IE change color for your place holder; if ($.browser.msie === true) { $(el).css('color', '#6d6d6d'); } } });
CSS Code:/*This will make the placeholder invisible in Gecko/WebKit browsers on focus*/input:focus::-webkit-input-placeholder { color: transparent !important; } input:focus:-moz-placeholder {color: transparent !important; }
I hope the code helps others, with the same cross browser issues.
but without success.<divid="products"data-role="treeview"data-text-field="Name"data-value-field="Id"data-check-field="Checked"data-check="true"data-bind="source: SpecificationProducts"></div>
body { background-color: #fff; border-top: solid 10px #000; color: #333; font-size: .85em; font-family: "Segoe UI", Verdana, Helvetica, Sans-Serif; margin: 0; padding: 0;}<script id="endless-scrolling-template" type="text/x-kendo-template"><div class="resultline"> #= company_name # <span class="sublink"> #=company_num #/#= company_bus_ind # </span></div></script><script>function mobileListViewEndlessScrolling() {var dataSource = new kendo.data.DataSource({ pageSize: 10, serverPaging: true, transport: { read: { url: "OpenServiceWrapper/customlist", // the remove service url dataType: "json" }, parameterMap: function (options) { var parameters = { //additional parameters sent to the remote service company_name: "bank", company_bus_ind: "c", max: options.pageSize, page: options.page, //next page -- this is automatically incremented as part of kendo totalCount: $("#company-matches-found").html() } return parameters; } }, change: function (e) {// console.log("Page = " + e.sender._page);// console.log("Page size = " + e.sender._pageSize);// console.log("Next page = " + dataSource._pristine.next_page);// console.log("Previous page = " + dataSource._pristine.previous_page);// console.log("Total count = " + dataSource._pristine.total_count); var t = dataSource._pristine.total_count; console.log($("#company-matches-found").html(t)); var m = e.sender._page * e.sender._pageSize; if (m >= t) { alert("That's it... no more matches"); // I want to flick off server side call back here } }, schema: { // describe the result format: this should correspond to class CustomCompany total: "total_count", page: "page", data: "results", // the data which the data source will be bound to is in the "results" field model: { fields: { company_num: { type: 'number' }, company_name: { type: 'string' }, company_bus_ind: { type: 'string' } } } }});$("#endless-scrolling").kendoMobileListView({ dataSource: dataSource, template: $("#endless-scrolling-template").text(), endlessScroll: true, scrollTreshold: 30 //treshold in pixels});}</script>