Skip to content
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

DxThemes.current crashes on Chrome emulating iPhone X when upgrading to 17.2.5. #682

Closed
HumaMilisic opened this issue Jan 31, 2018 · 2 comments
Assignees
Labels

Comments

@HumaMilisic
Copy link

To help us process the issue more efficiently, please provide the following information:

  • Specify the version of the devextreme-angular and devextreme packages you are using.

    devexteme version: 17.2.5
    devextreme-angular version: 17.2.5

  • Specify the type of the issue (check one with "x"):
    [x] bug Report
    [ ] feature request
    [ ] support inquiry

Windows 7
Chome 63.0.3239.132

Upgrading from 17.1.7 to 17.2.5.

Steps:

  1. Open angular 5.1.1 app in chrome
  2. Open developer tools
  3. Turn on toggle device toolbar
  4. Pick iPhone X(any mobile) and refresh

ERROR Error: Uncaught (in promise): SyntaxError: Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.
Error: Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.
at Object.setClass (dom_adapter.js:56)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.toggleClass (renderer_base.js:165)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.removeClass (renderer_base.js:135)
at detachCssClasses (themes.js:242)
at Object.current (themes.js:151)
at AdminLayoutComponent.webpackJsonp.../../../../../src/app/layouts/admin/admin-layout.component.ts.AdminLayoutComponent.setTheme (admin-layout.component.ts:259)
at new AdminLayoutComponent (admin-layout.component.ts:83)
at createClass (core.js:12480)
at createDirectiveInstance (core.js:12315)
at createViewNodes (core.js:13776)
at Object.setClass (dom_adapter.js:56)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.toggleClass (renderer_base.js:165)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.removeClass (renderer_base.js:135)
at detachCssClasses (themes.js:242)
at Object.current (themes.js:151)
at AdminLayoutComponent.webpackJsonp.../../../../../src/app/layouts/admin/admin-layout.component.ts.AdminLayoutComponent.setTheme (admin-layout.component.ts:259)
at new AdminLayoutComponent (admin-layout.component.ts:83)
at createClass (core.js:12480)
at createDirectiveInstance (core.js:12315)
at createViewNodes (core.js:13776)
at resolvePromise (zone.js:809)
at resolvePromise (zone.js:775)
at zone.js:858
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4744)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at drainMicroTaskQueue (zone.js:595)
at
defaultErrorLogger @ core.js:1427
webpackJsonp.../../../core/esm5/core.js.ErrorHandler.handleError @ core.js:1488
next @ core.js:5498
schedulerFn @ core.js:4339
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:240
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.SafeSubscriber.next @ Subscriber.js:187
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.Subscriber._next @ Subscriber.js:128
webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.Subscriber.next @ Subscriber.js:92
webpackJsonp.../../../../rxjs/_esm5/Subject.js.Subject.next @ Subject.js:56
webpackJsonp.../../../core/esm5/core.js.EventEmitter.emit @ core.js:4319
(anonymous) @ core.js:4775
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:388
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ zone.js:138
webpackJsonp.../../../core/esm5/core.js.NgZone.runOutsideAngular @ core.js:4701
onHandleError @ core.js:4775
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:392
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runGuarded @ zone.js:154
_loop_1 @ zone.js:684
api.microtaskDrainDone @ zone.js:693
drainMicroTaskQueue @ zone.js:602
Promise resolved (async)
scheduleMicroTask @ zone.js:578
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410
onScheduleTask @ zone.js:297
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:401
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:232
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:252
scheduleResolveOrReject @ zone.js:856
resolvePromise @ zone.js:803
(anonymous) @ zone.js:728
webpackJsonpCallback @ bootstrap a9a0dd14b38995ed47a8:21
(anonymous) @ dashboard.module.chunk.js:1

Uncaught (in promise) DOMException: Failed to execute 'remove' on 'DOMTokenList': The token provided must not be empty.
at Object.setClass (https://localhost/vendor.bundle.js:94712:39)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.toggleClass (https://localhost/vendor.bundle.js:95758:20)
at initRender.webpackJsonp.../../../../devextreme/core/renderer_base.js.initRender.removeClass (https://localhost/vendor.bundle.js:95728:17)
at detachCssClasses (https://localhost/vendor.bundle.js:197548:16)
at Object.current (https://localhost/vendor.bundle.js:197457:5)
at AdminLayoutComponent.webpackJsonp.../../../../../src/app/layouts/admin/admin-layout.component.ts.AdminLayoutComponent.setTheme (https://localhost/main.bundle.js:4146:26)
at new AdminLayoutComponent (https://localhost/main.bundle.js:3958:14)
at createClass (https://localhost/vendor.bundle.js:435635:20)
at createDirectiveInstance (https://localhost/vendor.bundle.js:435470:37)
at createViewNodes (https://localhost/vendor.bundle.js:436931:53)

debugging:
DxThemes.current(theme); // step into
detachCssClasses(viewPort()); // throws exception

whole app crashes// does not crash with device toolbar off

Project setup:
index.html:
<link rel="stylesheet" type="text/css" href="assets/devextreme/dx.common.css" />
<link rel="dx-theme" data-theme="default" type="text/css" href="assets/devextreme/default.css" data-active="true" />
<link rel="dx-theme" data-theme="dark" type="text/css" href="assets/devextreme/dark.css" data-active="false" />
<link rel="dx-theme" data-theme="orange" type="text/css" href="assets/devextreme/orange.css" data-active="false" />
<link rel="dx-theme" data-theme="material" type="text/css" href="assets/devextreme/material.css" data-active="false" />

themes are switched with DxThemes.current(theme); where theme is one of allThemes: Array = ['default', 'dark', 'orange'];

all this worked in 17.1.7

@GoshaFighten GoshaFighten self-assigned this Jan 31, 2018
@GoshaFighten
Copy link
Contributor

Yes, I can reproduce this issue with the plunk. We will research it.

@GoshaFighten GoshaFighten removed their assignment Jan 31, 2018
@dxvladislavvolkov dxvladislavvolkov self-assigned this Feb 1, 2018
@dxvladislavvolkov
Copy link
Contributor

Fixed in #2806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants