Fixed IE11 compatibility

This commit is contained in:
benweet 2014-08-22 00:14:58 +01:00
parent fc8a9c641d
commit 334142bbdf
3 changed files with 7 additions and 7 deletions

View File

@ -29,7 +29,7 @@
"jsondiffpatch": "https://github.com/benweet/jsondiffpatch.git#fb9dddf7cd076d8ec89d376c0e9de9223e9888f9",
"hammerjs": "~1.0.10",
"raphael": "~2.1.2",
"js-sequence-diagrams": "https://github.com/benweet/js-sequence-diagrams.git#7b157daa2deaf5b46b320673cc2ddabe6f013725",
"js-sequence-diagrams": "https://github.com/benweet/js-sequence-diagrams.git#d60c973aa0ff148dc588c7ceee0b41e59dff3f9f",
"flowchart": "https://github.com/adrai/flowchart.js.git#~1.2.10",
"monetizejs": "~0.2.0"
}

View File

@ -275,7 +275,7 @@ define([
}
if(selectionStart === selectionEnd && selectionStart > textContent.length) {
// In Firefox cursor can be after the trailingLfNode
selection.nativeSelection.modify("move", "backward", "character");
selection.nativeSelection.modify && selection.nativeSelection.modify("move", "backward", "character");
selectionStart = --selectionEnd;
}
}
@ -644,10 +644,10 @@ define([
eventMgr.addListener('onCommentsChanged', onComment);
var triggerSpellCheck = _.debounce(function() {
if(!selectionMgr.hasFocus || selectionMgr.selectionStart !== selectionMgr.selectionEnd) {
var selection = window.getSelection();
if(!selectionMgr.hasFocus || selectionMgr.selectionStart !== selectionMgr.selectionEnd || !selection.modify) {
return;
}
var selection = window.getSelection();
// Hack for Chrome to trigger the spell checker
if(selectionMgr.selectionStart) {
selection.modify("move", "backward", "character");

View File

@ -6,9 +6,9 @@ define([
"classes/Extension",
"text!html/umlDiagramsSettingsBlock.html",
'crel',
'sequence-diagram',
'Diagram',
'flow-chart'
], function($, _, utils, logger, Extension, umlDiagramsSettingsBlockHTML, crel, sequenceDiagram, flowChart) {
], function($, _, utils, logger, Extension, umlDiagramsSettingsBlockHTML, crel, Diagram, flowChart) {
var umlDiagrams = new Extension("umlDiagrams", "UML Diagrams", true);
umlDiagrams.settingsBlock = umlDiagramsSettingsBlockHTML;
@ -18,7 +18,7 @@ define([
editor.hooks.chain("onPreviewRefresh", function() {
_.each(previewContentsElt.querySelectorAll('.prettyprint > .language-sequence'), function(elt) {
try {
var diagram = sequenceDiagram.parse(elt.textContent);
var diagram = Diagram.parse(elt.textContent);
var preElt = elt.parentNode;
var containerElt = crel('div', {
class: 'sequence-diagram'