survey-angular-ui 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/survey-angular-ui.umd.js +16 -2
- package/bundles/survey-angular-ui.umd.js.map +1 -1
- package/esm2015/utils/ng-key2click.directive.js +17 -3
- package/fesm2015/survey-angular-ui.js +16 -2
- package/fesm2015/survey-angular-ui.js.map +1 -1
- package/package.json +2 -2
- package/utils/ng-key2click.directive.d.ts +3 -0
|
@@ -3182,6 +3182,7 @@
|
|
|
3182
3182
|
var _this = this;
|
|
3183
3183
|
this.el = el;
|
|
3184
3184
|
this.isSubscribed = false;
|
|
3185
|
+
this.isPointerUpSubscribed = false;
|
|
3185
3186
|
this.options = Object.assign({}, Key2ClickDirective.defaultOptions);
|
|
3186
3187
|
this.onkeyup = function (evt) {
|
|
3187
3188
|
evt.preventDefault();
|
|
@@ -3198,6 +3199,7 @@
|
|
|
3198
3199
|
}
|
|
3199
3200
|
};
|
|
3200
3201
|
this.subscribeEventListeners();
|
|
3202
|
+
this.subscribePointerUp();
|
|
3201
3203
|
}
|
|
3202
3204
|
Key2ClickDirective.prototype.onkeydown = function (evt) {
|
|
3203
3205
|
Survey.doKey2ClickDown(evt, this.options);
|
|
@@ -3212,11 +3214,22 @@
|
|
|
3212
3214
|
enumerable: false,
|
|
3213
3215
|
configurable: true
|
|
3214
3216
|
});
|
|
3217
|
+
Key2ClickDirective.prototype.subscribePointerUp = function () {
|
|
3218
|
+
if (this.isPointerUpSubscribed)
|
|
3219
|
+
return;
|
|
3220
|
+
this.element.addEventListener("pointerup", this.onpointerup.bind(this));
|
|
3221
|
+
this.isPointerUpSubscribed = true;
|
|
3222
|
+
};
|
|
3223
|
+
Key2ClickDirective.prototype.unsubscribePointerUp = function () {
|
|
3224
|
+
if (!this.isPointerUpSubscribed)
|
|
3225
|
+
return;
|
|
3226
|
+
this.element.removeEventListener("pointerup", this.onpointerup.bind(this));
|
|
3227
|
+
this.isPointerUpSubscribed = false;
|
|
3228
|
+
};
|
|
3215
3229
|
Key2ClickDirective.prototype.subscribeEventListeners = function () {
|
|
3216
3230
|
if (this.isSubscribed)
|
|
3217
3231
|
return;
|
|
3218
3232
|
this.element.tabIndex = 0;
|
|
3219
|
-
this.element.addEventListener("pointerup", this.onpointerup.bind(this));
|
|
3220
3233
|
this.element.addEventListener("keyup", this.onkeyup.bind(this));
|
|
3221
3234
|
this.element.addEventListener("keydown", this.onkeydown.bind(this));
|
|
3222
3235
|
this.element.addEventListener("blur", this.blur);
|
|
@@ -3226,7 +3239,6 @@
|
|
|
3226
3239
|
if (!this.isSubscribed)
|
|
3227
3240
|
return;
|
|
3228
3241
|
this.element.tabIndex = -1;
|
|
3229
|
-
this.element.removeEventListener("pointerup", this.onpointerup.bind(this));
|
|
3230
3242
|
this.element.removeEventListener("keyup", this.onkeyup.bind(this));
|
|
3231
3243
|
this.element.removeEventListener("keydown", this.onkeydown.bind(this));
|
|
3232
3244
|
this.element.removeEventListener("blur", this.blur);
|
|
@@ -3234,6 +3246,7 @@
|
|
|
3234
3246
|
};
|
|
3235
3247
|
Key2ClickDirective.prototype.ngOnChanges = function (changes) {
|
|
3236
3248
|
var curValue = changes["key2click"].currentValue;
|
|
3249
|
+
this.subscribePointerUp();
|
|
3237
3250
|
if (curValue.disableTabStop) {
|
|
3238
3251
|
this.unsubscribeEventListeners();
|
|
3239
3252
|
}
|
|
@@ -3244,6 +3257,7 @@
|
|
|
3244
3257
|
};
|
|
3245
3258
|
Key2ClickDirective.prototype.ngOnDestroy = function () {
|
|
3246
3259
|
this.unsubscribeEventListeners();
|
|
3260
|
+
this.unsubscribePointerUp();
|
|
3247
3261
|
};
|
|
3248
3262
|
return Key2ClickDirective;
|
|
3249
3263
|
}());
|