vue-expandable-image icon indicating copy to clipboard operation
vue-expandable-image copied to clipboard

Problem with Internet explorer

Open davidhedelin1 opened this issue 5 years ago • 12 comments

Hello,

I'm using your package and it works great. However, when someone is using internet explorer and clicks an image it shows a larger picture which is great. After you have exited the large picture it is no longer possible to do anything on the page. It acts frozen. It works as expected in Google Chrome.

davidhedelin1 avatar Jun 18 '19 09:06 davidhedelin1

how did you make it work? if I may ask.

KaitoXion avatar Jun 19 '19 11:06 KaitoXion

I added this code in the method:

var elements = document.getElementsByClassName("expanded"); var child = elements.length - 1; elements[child].parentNode.removeChild(elements[child]);


Below is my whole method:

`methods: { closeImage (event) {

  var elements = document.getElementsByClassName("expanded");                               
  var child = elements.length - 1;                  
  elements[child].parentNode.removeChild(elements[child]);

  this.expanded = false
  event.stopPropagation()
}`

@TahaSh @KaitoXion

davidhedelin1 avatar Jun 19 '19 12:06 davidhedelin1

@davidhedelin1

ohh, i see. so I have to implement all the code in JS as well. Am a noop. thank you very much for the information.

KaitoXion avatar Jun 19 '19 13:06 KaitoXion

You dont have to implement the code if you download the package. The code that I gave to you above is only to fix Internet Explorer issue. @KaitoXion

davidhedelin1 avatar Jun 19 '19 17:06 davidhedelin1

@davidhedelin1 I see. well, it happen to not work for me after I included the tag.

<expandable-image src="../img.png"></expandable-image>

I've did the; ES6

import VueExpandableImage from 'vue-expandable-image'
Vue.use(VueExpandableImage)

I've posted a new topic the weird behavior i am experiencing. it get dark panels after clicking onto an img that don't display at all, even for the thumbnail (before clicking the img). maybe I have to :src="{required('../img.png')}" or something. lol

You dont have to implement the code if you download the package. The code that I gave to you above is only to fix Internet Explorer issue. @KaitoXion

^thank you for your kind reply for this, this information is very helpful. thank you very much for your kindness. :)

KaitoXion avatar Jun 19 '19 17:06 KaitoXion

Where did you put this code?

import VueExpandableImage from 'vue-expandable-image' Vue.use(VueExpandableImage)

I put this code in my main.js page.

@KaitoXion

davidhedelin1 avatar Jun 20 '19 07:06 davidhedelin1

And how about this code:

<expandable-image src="../img.png"></expandable-image>

Did you add an image to your project and reference where it exists?

@KaitoXion

davidhedelin1 avatar Jun 20 '19 07:06 davidhedelin1

same problem for me with <expandable-image src="../assets/img.jpg"></expandable-image>

(in Firefox and Chrome)

timoteo7 avatar Sep 09 '19 05:09 timoteo7

@timoteo7 what error do you get in the console?

TahaSh avatar Sep 09 '19 14:09 TahaSh

not have error in console, is the 'src' that dont found the image, with npm run serve is src='http://localhost:8080/assets/img.jpg' (error) with original <img>, src='http://localhost:8080/img/img.9d1eddd4.jpg' (<img> is correct and open)

with npm run build same happened, dont correct link to image like when in <img>

timoteo7 avatar Sep 10 '19 20:09 timoteo7

@timoteo7 Here's how to fix this issue: https://github.com/TahaSh/vue-expandable-image#the-image-doesnt-load-for-you

TahaSh avatar Sep 11 '19 15:09 TahaSh

Thank you...

timoteo7 avatar Sep 11 '19 17:09 timoteo7