Skip to content

Commit

Permalink
FIX: Image onload not triggered with edge
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-she committed Apr 30, 2019
1 parent 783ca97 commit d7f3e06
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/simditor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Simditor v2.3.24
* Simditor v2.3.25
* http://simditor.tower.im/
* 2019-04-18
* 2019-05-01
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
Expand Down Expand Up @@ -4669,7 +4669,7 @@ ImageButton = (function(superClass) {
$mask.remove();
return $img.removeData('mask').removeClass('loading');
};
return img.src = src;
return img.setAttribute('src', src);
};

ImageButton.prototype.createImage = function(name) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simditor",
"version": "2.3.24",
"version": "2.3.25",
"description": "A simple online editor",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion site/assets/scripts/simditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4664,7 +4664,7 @@ ImageButton = (function(superClass) {
$mask.remove();
return $img.removeData('mask').removeClass('loading');
};
return img.src = src;
return img.setAttribute('src', src);
};

ImageButton.prototype.createImage = function(name) {
Expand Down
2 changes: 1 addition & 1 deletion src/buttons/image.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class ImageButton extends Button
$img.removeData('mask')
.removeClass('loading')

img.src = src
img.setAttribute 'src', src

createImage: (name = 'Image') ->
@editor.focus() unless @editor.inputManager.focused
Expand Down
4 changes: 2 additions & 2 deletions styles/simditor.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Simditor v2.3.24
* Simditor v2.3.25
* http://simditor.tower.im/
* 2019-04-18
* 2019-05-01
*/
@font-face {
font-family: 'Simditor';
Expand Down

0 comments on commit d7f3e06

Please sign in to comment.