driver.js icon indicating copy to clipboard operation
driver.js copied to clipboard

I want to add new Custom Button on Popover. How to add new buttons and also How to add click event on to it?

Open rahuljavascript1 opened this issue 6 years ago • 3 comments

Hi, I am using driver.js in my react application. I need to add a new custom button on the popover. And also that button will have a click event. I shall be thankful to you for this. I tried using the template string literal in the "description " of "popover " but the onClick function is not working. Let me know if you have any solution for this.

rahuljavascript1 avatar Mar 04 '19 20:03 rahuljavascript1

Dealing with the same issue here.

I cant call the onclick function. it just blinks on the screen. Any updates?

joshua88m avatar May 01 '19 19:05 joshua88m

If there's no event.stopPropogation in the library code (Which should be the case) then you can catch the clicks on any elements (and/or buttons) by ->

document.addEventListener('click', ({target}) => {})

ghost avatar May 01 '19 19:05 ghost

Regards the buttons creation I think that you can hide the footer and to create buttons by adding them to the description html template! In that way you can walk-around the template of DriverJS if it restricts you.

ghost avatar May 01 '19 19:05 ghost

We just released v1.0 of driver.js which has been rewritten from the ground up. Please Look at the custom button docs page.

kamranahmedse avatar Jul 05 '23 17:07 kamranahmedse