JavaScript My JavaScript code crashes in Chrome, when script tries to make fixed element visible

I have added few elements with "visibility:hidden; position:fixed;" to the top of the page and for some reason, when I launch the script in Chrome, it makes "#pageOverlay" visible, but fails to unhide other elements. Here is the JS function that fails:

function showImage(element) {
//locating currentGalleryItemIndex

for (currentGalleryItemIndex = firstGalleryItemIndex; currentGalleryItemIndex <= lastGalleryItemIndex; currentGalleryItemIndex++) {
    if (galleryItems[currentGalleryItemIndex] === element) break;
}

//general settings

fillPreviewArea();

pageOverlay.style.visibility = "visible";

previewArea.style.visibility = "visible";

previewAreaCloseLink.style.visibility = "visible";

previewAreaActive = true;
}

The same thing doesn't happen in Firefox and IE11 and it only works in chrome if I change all "position:fixed;" to "position:absolute;"; which isn't what I want to use.

The page that uses the script is here:

http://spongebobia.com/spongebob-captures/gallery.php

And the actual script is here:

http://spongebobia.com/spongebob-captures/scripts/previewArea.js

How to make it work while keeping "position: fixed;"?

Answer:1

I'm trying to figure out if this is a possibility. Concept is that there is a need for FAB actions to stay open after clicked. They need is that i want to have a classic FAB angular material FAB ...

I'm trying to figure out if this is a possibility. Concept is that there is a need for FAB actions to stay open after clicked. They need is that i want to have a classic FAB angular material FAB ...

I want create live audio streaming by websockets. This what works for me is listening microphone, create PCM, load PCM to BufferSource and playback. This what doesn't work is send PCM by websockets ...

I want create live audio streaming by websockets. This what works for me is listening microphone, create PCM, load PCM to BufferSource and playback. This what doesn't work is send PCM by websockets ...

  1. streaming audio audio recorder
  2. audio streaming radio hindvani
  3. audio streaming radio

I am using angular2 http.post in the following service: import {Injectable, Inject} from 'angular2/core' import {Http, Response, RequestOptions, Headers, Request, RequestMethod} from 'angular2/http'; ...

I am using angular2 http.post in the following service: import {Injectable, Inject} from 'angular2/core' import {Http, Response, RequestOptions, Headers, Request, RequestMethod} from 'angular2/http'; ...

I'm experimenting with a simple Javascript debugger for a WebView. I'd like to debug/control/inspect how some Javascript code is being executed inside my WebView. I haven't found any solution other ...

I'm experimenting with a simple Javascript debugger for a WebView. I'd like to debug/control/inspect how some Javascript code is being executed inside my WebView. I haven't found any solution other ...

  1. debug javascript android studio
  2. debug javascript android
  3. debug javascript android chrome
  4. debug javascript android webview
  5. debug javascript android emulator
  6. debug js android
  7. debug android javascript browser
  8. cordova debug javascript android
  9. debug javascript on android device
  10. debug javascript on android phone
  11. debug js remotely android emulator
  12. debug js remotely android
  13. debug js remotely android device
  14. debug js in android studio
  15. debug javascript firefox android