Skip to content

Commit

Permalink
Fixes #391 allowKeyboardControl option not working
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse committed Aug 4, 2023
1 parent 03a298d commit 529f19a
Show file tree
Hide file tree
Showing 4 changed files with 510 additions and 704 deletions.
27 changes: 27 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ <h2>Tour Feature</h2>
<button id="progress-tour-template">Progress Text Template</button>
<button id="api-test">API Test</button>
<button id="reconfigure-steps">Re Configuring Steps</button>
<button id="disable-keyboard-control">Disable Keyboard Control</button>
</div>

<ul>
Expand Down Expand Up @@ -492,6 +493,32 @@ <h2>Usage and Demo</h2>
driverObj.drive();
});

document.getElementById("disable-keyboard-control").addEventListener("click", () => {
const driverObj = driver({
animate: true,
steps: basicTourSteps,
showProgress: true,
allowKeyboardControl: false,
});

driverObj.setSteps([
{
element: "h1",
popover: {
description: "This is a new description"
}
},
{
element: "p",
popover: {
description: "This is another new description"
}
}
])

driverObj.drive();
});

document.getElementById("async-tour").addEventListener("click", () => {
const driverObj = driver({
animate: true,
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
],
"devDependencies": {
"@types/jsdom": "^21.1.1",
"@types/node": "^20.3.0",
"@types/node": "^20.4.6",
"@vitest/coverage-c8": "^0.32.0",
"dts-bundle-generator": "^8.0.1",
"postcss": "^8.4.24",
"postcss": "^8.4.27",
"postcss-scss": "^4.0.6",
"prettier": "^2.8.8",
"prettier": "^3.0.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"vitest": "^0.32.0"
"typescript": "^5.1.6",
"vite": "^4.4.8",
"vitest": "^0.34.1"
},
"keywords": [
"driver.js",
Expand Down

0 comments on commit 529f19a

Please sign in to comment.