materialize icon indicating copy to clipboard operation
materialize copied to clipboard

TapTarget / FeatureDiscovery isOpen not working

Open rustyricky opened this issue 8 years ago • 2 comments

Expected Behavior

When calling tapTarget with isOpen: true (M.TapTarget.init(elem, options, true);) the Feature Discovery is open on load

Current Behavior

The Feature Discovery is closed but can be opened using a manual toggle (see toggle button in Codepen)

Possible Solution

Steps to Reproduce (for bugs)

Create a Page following the manual: http://materializecss.com/feature-discovery.html Initialize tapTarget with isOpen: true See this Codepen: https://codepen.io/anon/pen/pVzqVJ

Your Environment

  • Version used: 1.0.0-beta
  • Browser Name and version: Firefox 59.0.2 x64
  • Operating System and version (desktop or mobile): Pop_Os (Ubuntu) on Desktop

rustyricky avatar Apr 17 '18 19:04 rustyricky

Properties are not the same as passable options. Once you initialize your plugin you can access properties on the instance.

For example:

var instance = M.TapTarget.init(elem, options);
instance.isOpen // Read only property whether the tapTarget is open or not

You can use the open() method after you initialize it if you want it to start open.

acburst avatar Apr 17 '18 23:04 acburst

I misunderstood that, thank you for you help.

rustyricky avatar Apr 18 '18 10:04 rustyricky