@wiris/mathtype-html-integration-devkit
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "@wiris/mathtype-html-integration-devkit", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Allows to integrate Mathtype Web into any JavaScript HTML WYSIWYG rich text editor.", | ||
@@ -44,2 +44,3 @@ "keywords": [ | ||
"jest": "^26.1.0", | ||
"jest-css-modules-transform": "^4.0.1", | ||
"jest-html-reporter": "^3.1.3", | ||
@@ -60,5 +61,4 @@ "jest-raw-loader": "^1.0.1", | ||
"dependencies": { | ||
"jest-css-modules-transform": "^4.0.1", | ||
"uuid": "^8.1.0" | ||
} | ||
} |
@@ -93,3 +93,4 @@ import Configuration from './configuration'; | ||
this.deviceProperties.isAndroid = this.ua.indexOf('android') > -1; | ||
this.deviceProperties.isIOS = ((this.ua.indexOf('ipad') > -1) || (this.ua.indexOf('iphone') > -1)); | ||
this.deviceProperties.isIOS = ContentManager.isIOS(); | ||
@@ -191,3 +192,8 @@ /** | ||
if (this.modalDialogInstance.deviceProperties.isIOS) { | ||
setTimeout(function hide() { this.modalDialogInstance.hideKeyboard(); }, 400); | ||
setTimeout(function hide() { | ||
// Make sure the modalDialogInstance is available when the timeout is over | ||
// to avoid throw errors and stop execution. | ||
if(this.hasOwnProperty('modalDialogInstance')) this.modalDialogInstance.hideKeyboard(); | ||
}, 400); | ||
const formulaDisplayDiv = document.getElementsByClassName('wrs_formulaDisplay')[0]; | ||
@@ -307,2 +313,19 @@ Util.addEvent(formulaDisplayDiv, 'focus', this.modalDialogInstance.handleOpenedIosSoftkeyboard); | ||
/** | ||
* Returns true if device is iOS. Otherwise, false. | ||
* @returns {Boolean} | ||
*/ | ||
static isIOS() { | ||
return [ | ||
'iPad Simulator', | ||
'iPhone Simulator', | ||
'iPod Simulator', | ||
'iPad', | ||
'iPhone', | ||
'iPod' | ||
].includes(navigator.platform) | ||
// iPad on iOS 13 detection | ||
|| (navigator.userAgent.includes("Mac") && "ontouchend" in document); | ||
} | ||
/** | ||
* Returns true if editor is loaded. Otherwise, false. | ||
@@ -309,0 +332,0 @@ * @returns {Boolean} |
@@ -44,3 +44,3 @@ import PopUpMessage from './popupmessage'; | ||
const isAndroid = ua.indexOf('android') > -1; | ||
const isIOS = ((ua.indexOf('ipad') > -1) || (ua.indexOf('iphone') > -1)); | ||
const isIOS = ContentManager.isIOS(); | ||
this.iosSoftkeyboardOpened = false; | ||
@@ -371,2 +371,3 @@ this.iosMeasureUnit = ua.indexOf('crios') === -1 ? '%' : 'vh'; | ||
if (this.deviceProperties.isDesktop) { // Desktop. | ||
this.createModalWindowDesktop(); | ||
@@ -382,3 +383,3 @@ this.createResizeButtons(); | ||
this.createModalWindowAndroid(); | ||
} else if (this.deviceProperties.isIOS && !this.deviceProperties.isMobile) { | ||
} else if (this.deviceProperties.isIOS) { | ||
this.createModalWindowIos(); | ||
@@ -385,0 +386,0 @@ } |
@@ -120,3 +120,3 @@ /** | ||
this.overlayWrapper.style.display = 'none'; | ||
_wrs_modalWindow.focus(); | ||
// _wrs_modalWindow.focus(); This throws an error of not existing _wrs_modalWindow | ||
} | ||
@@ -123,0 +123,0 @@ } |
423902
1
9448
24
- Removedjest-css-modules-transform@^4.0.1
- Removedcamelcase@6.3.0(transitive)
- Removedcssesc@3.0.0(transitive)
- Removedjest-css-modules-transform@4.4.2(transitive)
- Removednanoid@3.3.8(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpostcss@8.5.3(transitive)
- Removedpostcss-nested@5.0.6(transitive)
- Removedpostcss-selector-parser@6.1.2(transitive)
- Removedsource-map-js@1.2.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)