Version v11.0p_2016-08-13/Pro Deployment (2016-08-13)
We have a listGrid that use a paging of 75 using a datasource using HTTP.
When using IE11, we have discovered that when we select the last record of a list of 565 records and then click on the Search button to trigger the search of the first 75 record, we have to fetchData(). One is triggered to get the range 0-75 record and the other one to get the range 528-567.
We don’t have this behavior in Chrome, we only have the first call. Below is the code use to fetch data.
if (this.listGrid)
{
this.hideRecordFeedback();
var fetchDataCallback = callback;
// If getMessageForNoResultInList() returns any value,
// we display its value in the grid before calling the potential callback we received.
// We can hook us here because fetchData() is only called when the user explicitly
// searches (or we programmatically fire a call to fetchData()). If the caller sets up his BaseList
// with "listGridAutoFetchData = true", this code does not get executed.
var msg = this.getMessageForNoResultInList();
if (msg)
{
var callbackListGrid = this.listGrid;
fetchDataCallback =
function(dsResponse, data, dsRequest)
{
if (! (data && data.length > 0))
{
callbackListGrid.setProperty('emptyMessage',msg);
}
// We "chain" the call to the callback after we did our own little trick.
if (callback)
{
Class.fireCallback(callback, 'dsResponse, data, dsRequest', [ dsResponse, data, dsRequest ]);
}
};
}
if(true === invalidateCache && isc.isA.ResultSet(this.listGrid.data))
{
this.listGrid.setData([]);
}
Class.delayCall('fetchData', [criteria, fetchDataCallback, this.getListGridFetchDataRequestProperties(requestProperties)], 0, this.listGrid);
}
Investigating this problem, I find out that the problem seems to be with the focus. In fact, the second fetch is triggered by the function focusInCanvas() where the record in the focus is fetched. It shouldn’t do that because anyway this record is not displayed in the list. Furthermore, I investigate with Chrome and there is no such thing with the focus. I try the remove the selection before the fetchData, but it doesn’t change anything. Below is the stack trace when the second fetchData() is called.
Is there a way to prevent IE11 to refresh its focus, or a way to remove the focus from the listGrid ?
We have a listGrid that use a paging of 75 using a datasource using HTTP.
When using IE11, we have discovered that when we select the last record of a list of 565 records and then click on the Search button to trigger the search of the first 75 record, we have to fetchData(). One is triggered to get the range 0-75 record and the other one to get the range 528-567.
We don’t have this behavior in Chrome, we only have the first call. Below is the code use to fetch data.
if (this.listGrid)
{
this.hideRecordFeedback();
var fetchDataCallback = callback;
// If getMessageForNoResultInList() returns any value,
// we display its value in the grid before calling the potential callback we received.
// We can hook us here because fetchData() is only called when the user explicitly
// searches (or we programmatically fire a call to fetchData()). If the caller sets up his BaseList
// with "listGridAutoFetchData = true", this code does not get executed.
var msg = this.getMessageForNoResultInList();
if (msg)
{
var callbackListGrid = this.listGrid;
fetchDataCallback =
function(dsResponse, data, dsRequest)
{
if (! (data && data.length > 0))
{
callbackListGrid.setProperty('emptyMessage',msg);
}
// We "chain" the call to the callback after we did our own little trick.
if (callback)
{
Class.fireCallback(callback, 'dsResponse, data, dsRequest', [ dsResponse, data, dsRequest ]);
}
};
}
if(true === invalidateCache && isc.isA.ResultSet(this.listGrid.data))
{
this.listGrid.setData([]);
}
Class.delayCall('fetchData', [criteria, fetchDataCallback, this.getListGridFetchDataRequestProperties(requestProperties)], 0, this.listGrid);
}
Investigating this problem, I find out that the problem seems to be with the focus. In fact, the second fetch is triggered by the function focusInCanvas() where the record in the focus is fetched. It shouldn’t do that because anyway this record is not displayed in the list. Furthermore, I investigate with Chrome and there is no such thing with the focus. I try the remove the selection before the fetchData, but it doesn’t change anything. Below is the stack trace when the second fetchData() is called.
Is there a way to prevent IE11 to refresh its focus, or a way to remove the focus from the listGrid ?
Comment