Skip to content

Commit 257087c

Browse files
author
pipeline
committed
Ej2 5128 bug fix
1 parent f9bd6d7 commit 257087c

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@
9898
</div>
9999
<div id="theme-switcher-popup" class="sb-theme-popup">
100100
<ul id="themelist" class="options">
101-
<li class="active" id="material">
101+
<li class="active e-list" id="material">
102102
<span class="sb-icons sb-theme-select sb-icon-icon-selection"></span>
103103
<span class="switch-text">Material</span>
104104
</li>
105-
<li id="fabric">
105+
<li class="e-list" id="fabric">
106106
<span class="sb-icons sb-theme-select sb-icon-icon-selection"></span>
107107
<span class="switch-text">Fabric</span>
108108
</li>

src/common/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<div class='sb-action-description sb-rightpane-padding'></div>
3838
<div class='sb-content-tab' id='content-tab'>
3939
<div id="sb-content" class='sb-content-section'>
40-
<div id='sb-content-header' class="e-header sb-content-tab-header">
40+
<div id='sb-content-header' class="e-tab-header sb-content-tab-header">
4141
<div>
4242
<span class="sb-icons sb-icon-Demo"></span>DEMO
4343
</div>

src/common/sb.component.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,12 @@ export class SBController {
308308
this.setThemeItemActive(location.hash.split('/')[1]);
309309
this.setSbLink();
310310
this.hideShowSBLoader(true);
311-
let themeName: string = localStorage.getItem('pointer') || (window.screen.width > 1366 ? 'touch' : 'mouse');
312-
if (themeName) {
313-
this.setMouseOrTouch(select('#' + themeName).innerHTML.toLowerCase(), false);
311+
let mT: string = localStorage.getItem('pointer') || (window.screen.width > 1366 ? 'touch' : 'mouse');
312+
if (Browser.isDevice) {
313+
mT = 'touch';
314+
}
315+
if (mT) {
316+
this.setMouseOrTouch(select('#' + mT).innerHTML.toLowerCase(), false);
314317
localStorage.removeItem('pointer');
315318
}
316319
this.isInitialRender = false;
@@ -403,13 +406,13 @@ export class SBController {
403406
this.leftControl.ngEle.nativeElement.style.display = '';
404407
if (this.isMobile) {
405408
this.leftControl.ngEle.nativeElement.style.display = 'none';
406-
this.leftControl.setMobileView();
407-
}else{
408-
addClass([this.leftControl.ngEle.nativeElement.querySelector('.sb-control-navigation')],'e-view')
409+
this.leftControl.setMobileView();
410+
} else {
411+
addClass([this.leftControl.ngEle.nativeElement.querySelector('.sb-control-navigation')], 'e-view')
409412
}
410413
this.hideAllPopups();
411414
this.updatePropertyPanel();
412-
415+
413416
addClass([this.mobileOverlay], 'sb-hide');
414417
}
415418

@@ -555,7 +558,7 @@ export class SBController {
555558

556559
onChangeTheme(e: Event) {
557560
let target: Element = <HTMLElement>e.target;
558-
target = target.closest('li');
561+
target = closest(target,'.e-list');
559562
let themeName: string = target.id;
560563
this.switchTheme(themeName);
561564
this.themePopup.hide();
@@ -600,7 +603,7 @@ export class SBController {
600603
}
601604
select('#' + theme).classList.add('active');
602605
this.themeDropDown.value = theme;
603-
document.body.classList.add(theme);
606+
document.body.classList.add(theme);
604607
}
605608

606609
setMouseOrTouch(str: string, reload?: boolean): void {

styles/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ propertye pane
11341134
display: none;
11351135
}
11361136
.control-section {
1137-
min-height: auto;
1137+
min-height: 150px;
11381138
}
11391139
}
11401140

0 commit comments

Comments
 (0)