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

Commit

Permalink
Merge pull request #33 from mendixlabs/fix/iOS-touch
Browse files Browse the repository at this point in the history
Fixing events on iOS
  • Loading branch information
diego-antonelli authored Jul 5, 2019
2 parents 1090a92 + e64d906 commit 9e41e78
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
31 changes: 24 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rich-text",
"widgetName": "RichText",
"version": "1.3.3",
"version": "1.3.4",
"description": "Rich inline or toolbar text editing",
"scripts": {
"start": "webpack-dev-server --hot --open",
Expand Down
7 changes: 7 additions & 0 deletions src/components/RichText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ export class RichText extends Component<RichTextProps> {
}
if (editor && props.tabAction === "indent") {
editor.addEventListener("keydown", event => event.stopPropagation());
editor.addEventListener("touchend", event => event.stopPropagation());
} else if (editor) {
editor.addEventListener("touchend", _ => {
if (this.quill && !this.quill.hasFocus()) {
this.quill.focus();
}
});
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="RichText" version="1.3.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="RichText" version="1.3.4" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="RichText.xml"/>
</widgetFiles>
Expand Down

0 comments on commit 9e41e78

Please sign in to comment.