Giter VIP home page Giter VIP logo

blazor.introjs's People

Contributors

mcbride-clint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blazor.introjs's Issues

Position in Step

Describe the feature

Good day,

First of all, thanks for this project. It has been very helpful so far in my Blazor application.

It is possible to use the position property per step?
Intro.js has the property available. I have tried to add a Position string property to the IntroJsStep class, but the start method throws and error.
Here is the intro.js documentation on this property:

introJs().setOptions({
  steps: [
  {
    element: document.querySelector('.card-demo'),
    intro: 'Tooltip has position right',
    position: 'right'
  },
  {
    element: document.querySelector('.card-demo-link'),
    intro: 'Tooltip has position left',
    position: 'left'
  },
  {
    element: document.querySelector('.card-demo-text'),
    intro: 'Tooltip has position bottom',
    position: 'bottom'
  },
  {
    element: document.querySelector('.card-demo'),
    intro: 'Tooltip has position top',
    position: 'top'
  }]
}).start();

Error on IntroStep with an assigned blazor onclick event

Describe the bug

Hi,

I noticed a bug when using an element in the definition of an IntroJsStep object, that was assigned an onclick-function via the blazor syntax "@OnClick". On reaching this step in the tutorial, it does not proceed and the following error is shown in the browser console:

Uncaught (in promise) TypeError: Converting circular structure to JSON
--> starting at object with constructor 'HTMLButtonElement'
| property '_blazorEvents_1' -> object with constructor 'B'
| property 'handlers' -> object with constructor 'Object'
| property 'click' -> object with constructor 'Object'
--- property 'element' closes the circle
at JSON.stringify ()
at O (blazor.webassembly.js:1:5193)
at g (blazor.webassembly.js:1:1609)
at N.invokeMethod (blazor.webassembly.js:1:3791)
at qo._introBeforeChangeCallback (blazor.intro.js:145:30)
at qo. (intro.min.js:12:40488)
at u (intro.min.js:12:1230)
at Generator._invoke (intro.min.js:12:983)
at Generator.next (intro.min.js:12:1593)
at n (intro.min.js:12:6699)

Steps to reproduce

  1. Define element with any @onclick-Function (e.g. button)
  2. Setup IntroJsOptions via Code. Add an IntroJsStep that contains element from step 1.
  3. Start tutorial.

Expected behaviour

The IntroJS wrapper should also work for elements that have an onclick-event attached. The intro step for such an element should be shown like every other step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.