Skip to content

Commit 11f4751

Browse files
author
pipeline
committed
Ej2 3776 scrollerissue
1 parent d1bcb80 commit 11f4751

File tree

2 files changed

+66
-60
lines changed

2 files changed

+66
-60
lines changed

package.json

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
11
{
2-
"name": "@syncfusion/ej2-samples",
3-
"version": "1.0.16",
4-
"description": "Samples for Syncfusion Essential JS 2",
5-
"author": "Syncfusion Inc.",
6-
"license": "SEE LICENSE IN license",
7-
"dependencies": {
8-
"@syncfusion/ej2": "^1.0.16",
9-
"@syncfusion/ej2-base": "^1.0.16",
10-
"@syncfusion/ej2-buttons": "^1.0.14",
11-
"@syncfusion/ej2-data": "^1.0.14",
12-
"@syncfusion/ej2-lists": "^1.0.14",
13-
"@syncfusion/ej2-grids": "^1.0.16",
14-
"@syncfusion/ej2-dropdowns": "^1.0.16",
15-
"@syncfusion/ej2-calendars": "^1.0.16",
16-
"@syncfusion/ej2-inputs": "^1.0.16",
17-
"@syncfusion/ej2-popups": "^1.0.16",
18-
"@syncfusion/ej2-charts": "^1.0.16",
19-
"@syncfusion/ej2-circulargauge": "^1.0.14",
20-
"@syncfusion/ej2-lineargauge": "^1.0.14",
21-
"@syncfusion/ej2-navigations": "^1.0.14",
22-
"cheerio": "^1.0.0-rc.1",
23-
"crossroads": "^0.12.2",
24-
"hasher": "^1.2.0"
25-
},
26-
"devDependencies": {
27-
"@types/chai": "^3.4.28",
28-
"@types/crossroads": "0.0.28",
29-
"@types/es6-promise": "0.0.28",
30-
"@types/hasher": "0.0.27",
31-
"@types/highlight.js": "^9.1.7",
32-
"@types/jasmine": "^2.2.29",
33-
"@types/jasmine-ajax": "^3.1.27",
34-
"@types/requirejs": "^2.1.26",
35-
"@types/signals": "0.0.16",
36-
"es6-promise": "^3.2.1",
37-
"gulp": "^3.9.1",
38-
"gulp-sass": "^3.1.0",
39-
"gulp-typescript": "^3.1.6",
40-
"requirejs": "^2.3.3",
41-
"typescript": "2.3.4",
42-
"browser-sync": "2.11.2",
43-
"jasmine-ajax": "^3.3.1",
44-
"jasmine-core": "^2.6.1",
45-
"karma": "^1.7.0",
46-
"karma-chrome-launcher": "^2.2.0",
47-
"karma-generic-preprocessor": "^1.1.0",
48-
"karma-htmlfile-reporter": "^0.3.5",
49-
"karma-jasmine": "^1.1.0",
50-
"karma-jasmine-ajax": "^0.1.13",
51-
"karma-requirejs": "^1.1.0",
52-
"run-sequence": "^1.2.2",
53-
"webpack": "2.5.1",
54-
"webpack-stream": "^3.2.0"
55-
},
56-
"scripts": {
57-
"build": "gulp build",
58-
"serve": "gulp serve",
59-
"test": "gulp test"
60-
}
2+
"name": "@syncfusion/ej2-samples",
3+
"version": "0.0.1",
4+
"description": "Samples for Syncfusion Essential JS 2",
5+
"author": "Syncfusion Inc.",
6+
"license": "SEE LICENSE IN license",
7+
"dependencies": {
8+
"@syncfusion/ej2": "*",
9+
"@syncfusion/ej2-base": "*",
10+
"@syncfusion/ej2-buttons": "*",
11+
"@syncfusion/ej2-data": "*",
12+
"@syncfusion/ej2-lists": "*",
13+
"@syncfusion/ej2-grids": "*",
14+
"@syncfusion/ej2-dropdowns": "*",
15+
"@syncfusion/ej2-calendars": "*",
16+
"@syncfusion/ej2-inputs": "*",
17+
"@syncfusion/ej2-popups": "*",
18+
"@syncfusion/ej2-charts": "*",
19+
"@syncfusion/ej2-circulargauge": "*",
20+
"@syncfusion/ej2-lineargauge": "*",
21+
"@syncfusion/ej2-navigations": "*",
22+
"cheerio": "^1.0.0-rc.1",
23+
"crossroads": "^0.12.2",
24+
"hasher": "^1.2.0"
25+
},
26+
"devDependencies": {
27+
"@types/chai": "^3.4.28",
28+
"@types/crossroads": "0.0.28",
29+
"@types/es6-promise": "0.0.28",
30+
"@types/hasher": "0.0.27",
31+
"@types/highlight.js": "^9.1.7",
32+
"@types/jasmine": "^2.2.29",
33+
"@types/jasmine-ajax": "^3.1.27",
34+
"@types/requirejs": "^2.1.26",
35+
"@types/signals": "0.0.16",
36+
"es6-promise": "^3.2.1",
37+
"gulp": "^3.9.1",
38+
"gulp-sass": "^3.1.0",
39+
"gulp-typescript": "^3.1.6",
40+
"requirejs": "^2.3.3",
41+
"typescript": "2.3.4",
42+
"browser-sync": "2.11.2",
43+
"jasmine-ajax": "^3.3.1",
44+
"jasmine-core": "^2.6.1",
45+
"karma": "^1.7.0",
46+
"karma-chrome-launcher": "^2.2.0",
47+
"karma-generic-preprocessor": "^1.1.0",
48+
"karma-htmlfile-reporter": "^0.3.5",
49+
"karma-jasmine": "^1.1.0",
50+
"karma-jasmine-ajax": "^0.1.13",
51+
"karma-requirejs": "^1.1.0",
52+
"run-sequence": "^1.2.2",
53+
"webpack": "2.5.1",
54+
"webpack-stream": "^3.2.0"
55+
},
56+
"scripts": {
57+
"build": "gulp build",
58+
"serve": "gulp serve",
59+
"test": "gulp test"
60+
}
6161
}

src/common/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ let execFunction: { [key: string]: Object } = {};
1919
let selectedTheme: string = location.hash.split('/')[1];
2020
let availableThemes: string[] = ['material', 'fabric'];
2121
let isHashChanged: boolean = true;
22+
let isButtonClick: boolean = false;
2223

2324
interface DestroyMethod extends HTMLElement {
2425
destroy: Function;
@@ -346,7 +347,10 @@ function addRoutes(samplesList: Controls[]): void {
346347
}
347348
let curIndex: number = samplesAr.indexOf(location.hash);
348349
let samLength: number = samplesAr.length - 1;
349-
scrollElement(sampleID);
350+
if (isButtonClick) {
351+
scrollElement(sampleID);
352+
isButtonClick = false;
353+
}
350354
if (curIndex === samLength) {
351355
toggleButtonState('next-sample', true);
352356
} else {
@@ -463,6 +467,7 @@ function onCloseClick(arg?: MouseEvent): void {
463467
}
464468

465469
function onNextButtonClick(arg: MouseEvent): void {
470+
isButtonClick = true;
466471
overlay();
467472
let curSampleUrl: string = location.hash;
468473
let inx: number = samplesAr.indexOf(curSampleUrl);
@@ -485,6 +490,7 @@ function toggleButtonState(id: string, state: boolean): void {
485490
}
486491

487492
function onPrevButtonClick(arg: MouseEvent): void {
493+
isButtonClick = true;
488494
overlay();
489495
let curSampleUrl: string = location.hash;
490496
let inx: number = samplesAr.indexOf(curSampleUrl);

0 commit comments

Comments
 (0)