vue-expandable-image
vue-expandable-image copied to clipboard
Problem with Internet explorer
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.
how did you make it work? if I may ask.
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
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.
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 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. :)
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
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
same problem for me with
<expandable-image src="../assets/img.jpg"></expandable-image>
(in Firefox and Chrome)
@timoteo7 what error do you get in the console?
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 Here's how to fix this issue: https://github.com/TahaSh/vue-expandable-image#the-image-doesnt-load-for-you
Thank you...