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

Commit

Permalink
Merge pull request #17 in WS/myscriptjs from fix-multiple-inputs to m…
Browse files Browse the repository at this point in the history
…aster

* commit 'bf7dcc99f60f16ce2d1802dd8a6648b16a16c7d7':
  [examples]: fix possibility to write on inputs (MSIS-1587)
  • Loading branch information
Steven Roulleau committed Nov 6, 2018
2 parents 9b116fd + bf7dcc9 commit 2969915
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/v4/multiple_inputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function attach(element, editor) {
listener:
function pointerDownHandler(evt) { // Trigger a pointerDown
const pointerDownOnEditor = evt.target.id === editor.domElement.id || evt.target.classList.contains('ms-canvas');
if (this.activePointerId) {
if (this.activePointerId !== undefined) {
if (this.activePointerId === evt.pointerId) {
console.log(`${evt.type} event with the same id without any pointer up`, evt.pointerId);
}
Expand All @@ -208,7 +208,7 @@ function attach(element, editor) {
listener:
function pointerMoveHandler(evt) { // Trigger a pointerMove
// Only considering the active pointer
if (this.activePointerId && this.activePointerId === evt.pointerId) {
if (this.activePointerId !== undefined && this.activePointerId === evt.pointerId) {
unfocus();
editor.pointerMove(extractPoint(evt, element, editor.configuration));
} else if (pointerDownOnInput) {
Expand All @@ -232,7 +232,7 @@ function attach(element, editor) {
listener:
function pointerUpHandler(evt) { // Trigger a pointerUp
pointerDownOnInput = false;
if (this.activePointerId && this.activePointerId === evt.pointerId) { // Only considering the active pointer
if (this.activePointerId !== undefined && this.activePointerId === evt.pointerId) { // Only considering the active pointer
this.activePointerId = undefined; // Managing the active pointer
evt.stopPropagation();
editor.pointerUp(extractPoint(evt, element, editor.configuration));
Expand Down

0 comments on commit 2969915

Please sign in to comment.