Skip to content

Commit

Permalink
Remove dependence on dpointer now that iOS 13 and Safari 13 support
Browse files Browse the repository at this point in the history
pointer events natively.
  • Loading branch information
wkeese committed Feb 14, 2020
1 parent 69414c1 commit 44c1484
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 22 deletions.
3 changes: 1 addition & 2 deletions HasDropDown.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ define([
"./popup",
"./register",
"./Widget",
"./activationTracker", // for delite-deactivated event
"dpointer/events" // for "pointerenter", "pointerleave"
"./activationTracker" // for delite-deactivated event
], function (
dcl,
Promise,
Expand Down
3 changes: 1 addition & 2 deletions KeyNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ define([
"dojo/window",
"./features",
"./on",
"./Widget",
"dpointer/events" // so can just monitor for "pointerdown"
"./Widget"
], function (
dcl,
win,
Expand Down
1 change: 0 additions & 1 deletion activationTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ define([
"ibm-decor/Evented",
"ibm-decor/sniff",
"./on",
"dpointer/events", // so can just monitor for "pointerdown"
"requirejs-domready/domReady!"
], function (advise, dcl, Evented, has, on) {

Expand Down
8 changes: 0 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"dcl": "^2.0.6",
"dojo": "^1.16.0",
"dojo-dstore": "1.1.x",
"dpointer": "0.5.x",
"ibm-decor": "0.8.x",
"messageformat": "1.0.2",
"requirejs-domready": "2.0.x",
Expand Down
13 changes: 5 additions & 8 deletions tests/functional/HasDropDown.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
simple-dialog, focus-menu, non-focus-menu {
display: block;
border: 1px solid black;

/* enable fast click, so testing code doesn't to wait 300ms for submit/cancel buttons to take effect */
touch-action: none;
}
non-focusable-drop-down-button {
white-space: nowrap;
Expand All @@ -46,15 +49,12 @@
"delite/Dialog",
"delite/HasDropDown",
"delite/Widget",
"dpointer/events", // since I'm using touch-action
"requirejs-domready/domReady!"
], function (dcl, Promise, register, Dialog, HasDropDown, Widget) {

// A trivial popup widget
var SimpleDialog = register("simple-dialog", [HTMLElement, Dialog], {
render: function () {
// enable fast click, so testing code doesn't to wait 300ms for submit/cancel buttons to take effect
this.setAttribute("touch-action", "none");
this.innerHTML = "<input><br>" +
"<button type=submit>submit</button><br><button type=button>cancel</button>";
},
Expand All @@ -80,9 +80,6 @@
render: function () {
this.className = "choice";

// enable fast click, so testing code doesn't to wait 300ms for clicking a choice to take effect
this.setAttribute("touch-action", "none");

this.on("click", this.emit.bind(this, "change"));

for (var i = 1; i < 4; i++) {
Expand Down Expand Up @@ -214,7 +211,7 @@
this.className="button";
this.tabIndex = "0";
},

label: dcl.prop({
set: function (val) {
this.textContent = val;
Expand Down Expand Up @@ -409,7 +406,7 @@
new SimpleComboButton({
id: "cb"
}).placeAt(document.body);

// Set global variable to signal that the test page is ready
ready = true;
});
Expand Down

0 comments on commit 44c1484

Please sign in to comment.