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

Setting Tabs to swipeable using angularjs data binding inside Tabs content triggers angularjs error #6258

Open
shoxton opened this issue Jan 10, 2019 · 0 comments

Comments

@shoxton
Copy link

shoxton commented Jan 10, 2019

Expected Behavior

The content binded should be seen the same way as when swipeable is set to false;

Current Behavior

You can check the bug on this pen.
Adding swipeable = true you can enable tabs where you can swipe on touch enabled devices to switch tabs, but when used with binding content in AngularJS, the following errors are logged, making it impossible to display the binded content.

TypeError: Cannot read property 'childNodes' of undefined
    at g (angular.js:9373)
    at g (angular.js:9373)
    at g (angular.js:9373)
    at p (angular.js:10093)
    at g (angular.js:9370)
    at g (angular.js:9373)
    at angular.js:9235
    at angular.js:1941
    at m.$eval (angular.js:18838)
    at m.$apply (angular.js:18937)
(anonymous) @ angular.js:15018
(anonymous) @ angular.js:11302
$apply @ angular.js:18942
(anonymous) @ angular.js:1939
invoke @ angular.js:5108
c @ angular.js:1937
Vc @ angular.js:1957
ye @ angular.js:1842
(anonymous) @ angular.js:35431
b @ angular.js:3491

TypeError: Cannot set property 'nodeValue' of undefined
    at angular.js:10510
    at angular.js:13448
    at angular.js:18241
    at m.$digest (angular.js:18585)
    at m.$apply (angular.js:18945)
    at angular.js:1939
    at Object.invoke (angular.js:5108)
    at c (angular.js:1937)
    at Vc (angular.js:1957)
    at ye (angular.js:1842)

Possible Solution

Use ui router views and HammerJS to reproduce the same functionality.

Steps to Reproduce (for bugs)

1.Add and initialize MaterializeCSS Tabs with swipeable = true
2.Bind some content from your controller on the Tabs content divs

Context

I'm developing a webapp that uses MaterializeCSS. I need the Tabs swipe functionality to make it more useful for mobile users.

Your Environment

  • Version used:
    MaterializeCSS 1.0.0
    AngularJS 1.7.2
  • Browser Name and version:
    Chrome Version 71.0.3578.98 (Official Build) (64-bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant