Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Make the tour advance on more events (blur, change, focus, select) #104

Closed
wants to merge 1 commit into from

Conversation

yeah
Copy link
Contributor

@yeah yeah commented Jun 29, 2014

references #103

@jayphelps
Copy link

👍 I had to hack exactly this sort of functionality.

@eoneill
Copy link
Contributor

eoneill commented Jul 10, 2014

Proposal: instead of creating a bunch of different nextOnTargetX options, could we just add a single nextOnTargetInteraction

and use this as...

nextOnTargetInteraction: {
  click: true,
  blur: true,
  focus: true
  mouseover: true,
  touchend: true,
  whatever: true
}

the integration would be something like...

var onInteraction = this.nextOnTargetInteraction;
for (var evt in onInteraction) {
  if (onInteraction.hasOwnProperty(evt) && onInteraction[evt]) {
    utils.addEvtListener(targetEl, evt, targetInteractNextFn);
  }
}

this should theoretically support any standard events the developer wants

@yeah
Copy link
Contributor Author

yeah commented Jul 10, 2014

Sure, only it would break existing tours if we remove nextOnTargetClick. Would be nice to keep that around still, with a deprecation warning, maybe...

Sent from my iPhone

On 10.07.2014, at 23:29, Eugene ONeill notifications@github.com wrote:

Proposal: instead of creating a bunch of different nextOnTargetX options, could we just add a single nextOnTargetInteraction

and use this as...

nextOnTargetInteraction: {
click: true,
blur: true,
focus: true
mouseover: true,
touchend: true,
whatever: true
}
the integration would be something like...

var onInteraction = this.nextOnTargetInteraction;
for (var evt in onInteraction) {
if (onInteraction.hasOwnProperty(evt) && onInteraction[evt]) {
utils.addEvtListener(targetEl, evt, targetInteractNextFn);
}
}
this should theoretically support any standard events the developer wants


Reply to this email directly or view it on GitHub.

@eoneill
Copy link
Contributor

eoneill commented Jul 10, 2014

I think you could keep nextOnTargetClick and just merge that value into nextOnTargetInteraction.

if (this.nextOnTargetClick) {
  // merge the old config
  utils.extend(this.nextOnTargetInteraction, {
    click: this.nextOnTargetClick
  });
  // throw a deprecation warning
  if (typeof console !== undefined && typeof console.warn === 'function') {
    console.warn('dont use nextOnTargetClick...');
  }
}

@jayphelps
Copy link

What's the latest on this?

@timlindvall
Copy link
Collaborator

Per #144, the current proposal is to deprecate nextOnTargetClick in core and make event handling on targets an optional plugin. Given that (and the fact that this PR is out of date with master), I'm closing this PR for now.

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

Successfully merging this pull request may close these issues.

None yet

4 participants