-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dgrid selector inconsistently working in touch screen devices like ipad dgrid/v1.1.0 #1476
Comments
I even upgraded to dgrid version 1.3.3 but issue stll remains. In touch screen It selects the rows even if selector checkbox is not checked |
@pnaqati can you clarify in what way dgrid is not working? I have created a grid with your settings and did not find any problems with selection in Safari on iOS or Chrome/Firefox on Android. Based on your description it sounds like you may be creating a dgrid instance as a descendant of a DOM element that is not initially visible. Some dgrid functionality is dependent on the dgrid DOM node being visible and in the document flow when dgrid is started up. For example, when dgrid is used within a tab that is not initially visible dgrid's |
The dgrid is programmatically inserted into a tabcontainer which is already created . It works perfectly in any browser except that in touch screens the selector checkbox exhibits inconsistent behaviour. I am appending it to the tabcontainer div which is a parent dom and first tabpane as shown below. I have another view where dgrid is directly inserted into parent div dom and it works there . Please do let me know If you think there is any info you need. |
I have some good news for you , It happens when I add "dojox/mobile/Switch" to the header of page. You guys can easily produce it now. It works perfectly when I remove switch and recurs when I add switch |
Hi , I have added comments and using last comment you guys can replicate
the issue Actually when i use dojox/mobile/switch this snag appears and
when I remove it this defect is resolved
…On Tue., Sep. 22, 2020, 8:26 p.m. Mangala Sadhu Sangeet Singh Khalsa, < ***@***.***> wrote:
@pnaqati <https://github.com/pnaqati> can you clarify in what way dgrid
is not working? I have created a grid with your settings and did not find
any problems with selection in Safari on iOS or Chrome/Firefox on Android.
Based on your description it sounds like you may be creating a dgrid
instance as a descendant of a DOM element that is not initially visible.
Some dgrid functionality is dependent on the dgrid DOM node being visible
and in the document flow when dgrid is started up. For example, when dgrid
is used within a tab that is not initially visible dgrid's startup method
should NOT be called before the tab is selected and made visible. Only
after the tab has been selected and its content made visible should
grid.startup() be called.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1476 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARA3VX2JUYQGADR3JSG566LSHE6BPANCNFSM4RPVDDWQ>
.
|
@pnaqati can you describe what behavior you are observing? It would be very helpful if you could provide a test case as well. I have done some testing with a grid based on the code provided in this issue and the grid works well. Test case<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dgrid Test</title>
<link rel="stylesheet" href="../dgrid/css/dgrid.css">
<link rel="stylesheet" href="../dgrid/css/skins/claro.css">
<link rel="stylesheet" href="../dojox/mobile/themes/ios7/ios7.css">
<style>
input[type=checkbox] {
height: 20px;
width: 20px;
}
</style>
</head>
<body>
<div id="switch"></div>
<div id="grid" class="claro"></div>
<script>
var dojoConfig = {
async: true,
baseUrl: '../',
packages: [
'dojo',
'dijit',
'dojox',
'dgrid',
'dstore'
]
};
</script>
<script src="../dojo/dojo.js"></script>
<script>
require([
'dojo/_base/declare',
'dstore/Memory',
'dstore/Trackable',
'dgrid/Grid',
'dgrid/OnDemandGrid',
'dgrid/Keyboard',
'dgrid/Selection',
'dgrid/Selector',
'dgrid/extensions/Pagination',
'dojox/mobile/Switch'
], function (declare, Memory, Trackable, Grid, OnDemandGrid, Keyboard, Selection, Selector, Pagination, Switch) {
var mySwitch = new Switch(null, document.getElementById('switch'));
mySwitch.startup();
var store = new (declare([Memory, Trackable]))({
data: createData()
});
var grid = new (declare([Grid, Selection, Pagination, Selector]))({
collection: store,
showHeader: true,
pageSizeOtpions: [50, 100, 200, 400],
pagingLinks: false,
pagingTextBox: true,
showLoadingMessage: true,
firstLastArrows: true,
rowsPerPage: 50,
offset: 0,
selectionMode: 'none',
allowSelectAll: true,
loadingMessage: 'Loading data...',
noDataMessage: 'No results found.',
columns: {
column0: {
label: '',
selector: 'checkbox'
},
First_Name: {
label: 'First Name'
},
Last_Name: {
label: 'Last Name'
},
thrid: {
label: 'thrid'
},
froth: {
label: 'froth'
}
}
}, 'grid');
grid.startup();
function createData() {
var data = [];
var column;
var i;
var item;
for (i = 0; i < 50; i++) {
item = {};
for (column in { First_Name: 1, Last_Name: 1, thrid: 1, froth: 1 }) {
item.id = i;
item[column] = column + '_' + (i + 1);
}
data.push(item);
}
return data;
}
});
</script>
</body>
</html> |
@Mnagala , You just have to add switch wizard in your page where dgrid is
? I have added it to the header of my page like
<div id="sw" class="mblSwRoundShape1 color1"
data-dojo-type="dojox/mobile/Switch" value="on" leftLabel="ON"
rightLabel="OFF"></div>
Once you add it then you will get the issue with dgrid selection on touch
screen only. This finding will help you produce the issue as I am able to
get the issue when I add this switch in my page and once I remove it the
issue with selection goes away
…On Fri., Sep. 25, 2020, 9:09 p.m. Mangala Sadhu Sangeet Singh Khalsa, < ***@***.***> wrote:
@pnaqati <https://github.com/pnaqati> can you describe what behavior you
are observing? It would be very helpful if you could provide a test case as
well. I have done some testing with a grid based on the code provided in
this issue and the grid works well.
Test case
<!DOCTYPE html><html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dgrid Test</title>
<link rel="stylesheet" href="../dgrid/css/dgrid.css">
<link rel="stylesheet" href="../dgrid/css/skins/claro.css">
<link rel="stylesheet" href="../dojox/mobile/themes/ios7/ios7.css">
<style>
input[type=checkbox] {
height: 20px;
width: 20px;
}
</style></head>
<body>
<div id="switch"></div>
<div id="grid" class="claro"></div>
<script>
var dojoConfig = {
async: true,
baseUrl: '../',
packages: [
'dojo',
'dijit',
'dojox',
'dgrid',
'dstore'
]
};
</script>
<script src="../dojo/dojo.js"></script>
<script>require([
'dojo/_base/declare',
'dstore/Memory',
'dstore/Trackable',
'dgrid/Grid',
'dgrid/OnDemandGrid',
'dgrid/Keyboard',
'dgrid/Selection',
'dgrid/Selector',
'dgrid/extensions/Pagination',
'dojox/mobile/Switch'], function (declare, Memory, Trackable, Grid, OnDemandGrid, Keyboard, Selection, Selector, Pagination, Switch) {
var mySwitch = new Switch(null, document.getElementById('switch'));
mySwitch.startup();
var store = new (declare([Memory, Trackable]))({
data: createData()
});
var grid = new (declare([Grid, Selection, Pagination, Selector]))({
collection: store,
showHeader: true,
pageSizeOtpions: [50, 100, 200, 400],
pagingLinks: false,
pagingTextBox: true,
showLoadingMessage: true,
firstLastArrows: true,
rowsPerPage: 50,
offset: 0,
selectionMode: 'none',
allowSelectAll: true,
loadingMessage: 'Loading data...',
noDataMessage: 'No results found.',
columns: {
column0: {
label: '',
selector: 'checkbox'
},
First_Name: {
label: 'First Name'
},
Last_Name: {
label: 'Last Name'
},
thrid: {
label: 'thrid'
},
froth: {
label: 'froth'
}
}
}, 'grid');
grid.startup();
function createData() {
var data = [];
var column;
var i;
var item;
for (i = 0; i < 50; i++) {
item = {};
for (column in { First_Name: 1, Last_Name: 1, thrid: 1, froth: 1 }) {
item.id = i;
item[column] = column + '_' + (i + 1);
}
data.push(item);
}
return data;
}});
</script></body></html>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1476 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARA3VX4SDTWV3DIRYW67D73SHU5KZANCNFSM4RPVDDWQ>
.
|
Hi Mangla , I was wondering if you were able to produce the issue , I have
resolved it for now by creating toggle button in place of switch button but
I really want to use switch
Best Regards
Parvez
On Fri., Sep. 25, 2020, 9:33 p.m. parvez naqati, ***@***.***>
wrote:
… @Mnagala , You just have to add switch wizard in your page where dgrid is
? I have added it to the header of my page like
<div id="sw" class="mblSwRoundShape1 color1"
data-dojo-type="dojox/mobile/Switch" value="on" leftLabel="ON"
rightLabel="OFF"></div>
Once you add it then you will get the issue with dgrid selection on touch
screen only. This finding will help you produce the issue as I am able to
get the issue when I add this switch in my page and once I remove it the
issue with selection goes away
On Fri., Sep. 25, 2020, 9:09 p.m. Mangala Sadhu Sangeet Singh Khalsa, <
***@***.***> wrote:
> @pnaqati <https://github.com/pnaqati> can you describe what behavior you
> are observing? It would be very helpful if you could provide a test case as
> well. I have done some testing with a grid based on the code provided in
> this issue and the grid works well.
> Test case
>
> <!DOCTYPE html><html lang="en"><head>
> <meta charset="UTF-8">
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
> <title>dgrid Test</title>
> <link rel="stylesheet" href="../dgrid/css/dgrid.css">
> <link rel="stylesheet" href="../dgrid/css/skins/claro.css">
> <link rel="stylesheet" href="../dojox/mobile/themes/ios7/ios7.css">
> <style>
> input[type=checkbox] {
> height: 20px;
> width: 20px;
> }
> </style></head>
> <body>
> <div id="switch"></div>
> <div id="grid" class="claro"></div>
> <script>
> var dojoConfig = {
> async: true,
> baseUrl: '../',
> packages: [
> 'dojo',
> 'dijit',
> 'dojox',
> 'dgrid',
> 'dstore'
> ]
> };
> </script>
> <script src="../dojo/dojo.js"></script>
> <script>require([
> 'dojo/_base/declare',
> 'dstore/Memory',
> 'dstore/Trackable',
> 'dgrid/Grid',
> 'dgrid/OnDemandGrid',
> 'dgrid/Keyboard',
> 'dgrid/Selection',
> 'dgrid/Selector',
> 'dgrid/extensions/Pagination',
> 'dojox/mobile/Switch'], function (declare, Memory, Trackable, Grid, OnDemandGrid, Keyboard, Selection, Selector, Pagination, Switch) {
> var mySwitch = new Switch(null, document.getElementById('switch'));
> mySwitch.startup();
>
> var store = new (declare([Memory, Trackable]))({
> data: createData()
> });
>
> var grid = new (declare([Grid, Selection, Pagination, Selector]))({
> collection: store,
> showHeader: true,
> pageSizeOtpions: [50, 100, 200, 400],
> pagingLinks: false,
> pagingTextBox: true,
> showLoadingMessage: true,
> firstLastArrows: true,
> rowsPerPage: 50,
> offset: 0,
> selectionMode: 'none',
> allowSelectAll: true,
> loadingMessage: 'Loading data...',
> noDataMessage: 'No results found.',
> columns: {
> column0: {
> label: '',
> selector: 'checkbox'
> },
> First_Name: {
> label: 'First Name'
> },
> Last_Name: {
> label: 'Last Name'
> },
> thrid: {
> label: 'thrid'
> },
> froth: {
> label: 'froth'
> }
> }
> }, 'grid');
>
> grid.startup();
>
> function createData() {
> var data = [];
> var column;
> var i;
> var item;
>
> for (i = 0; i < 50; i++) {
> item = {};
> for (column in { First_Name: 1, Last_Name: 1, thrid: 1, froth: 1 }) {
> item.id = i;
> item[column] = column + '_' + (i + 1);
> }
> data.push(item);
> }
>
> return data;
> }});
> </script></body></html>
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1476 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ARA3VX4SDTWV3DIRYW67D73SHU5KZANCNFSM4RPVDDWQ>
> .
>
|
@pnaqati I landed a fix in master that fixes an issue I saw with the selector checkbox on touch devices. Please try it out and let me know if the fix works for you. |
Hi Ed , that is great , thank you.
Can you please let me know which version of dojo dgrid I need to use? And
where do I need to pull it from ?
Best regards
Parvez
…On Thu., May 13, 2021, 2:57 p.m. Ed Hager, ***@***.***> wrote:
@pnaqati <https://github.com/pnaqati> I landed a fix in master that fixes
an issue I saw with the selector checkbox on touch devices. Please try it
out and let me know if the fix works for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1476 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARA3VX6J4ZHMBVVQDXLHWCLTNQOH5ANCNFSM4RPVDDWQ>
.
|
My dgrid's selection and selector with selectionMode : none perfectly works in any browser. However , recently I found that there is an issue with selection when using touch screen devices like ipad and on touch screen lenova laptop. I have another view where it works in touch screen as well but the difference is that dgrid is directly created in a parent div. In another use case where it fails in touch screen only is that when dgrid is inserted in the parent tabcontainer.
Following is the code snippet:
var generateComListStore=function(){
}
The text was updated successfully, but these errors were encountered: