Iframe overlay feature functioning on Chrome but not on IE11

I have a Document viewer with a .less file containing the following styling:

div.document-previewer-container {
//height: 400px;
//width: 300px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
//padding: 5px 2px;
> div.document-preview {
    height: 88%;
    //width: 100%;
    position: relative;

    .document-container, .text-container, video, iframe, pre {
        height: 100%;
        width: 100%;
        position: relative;
    }

    .document-container > img {
        max-height: 100%;
        max-width: 100%;
    }

    .text-container pre {
        margin: 0;
        padding: 0;
    }

    .doc-overlay {
        width: 95%;
        height: 95%;
        position: absolute;
        cursor: pointer;
        top: 0;

        p {
            padding: 2px;
        }
    }
}
}

The HTML code is as follows:

<div class="document-previewer-container">
<div class="document-preview">
    <h3 ng-click="vm.openPDF()">yu</h3> <----- THIS CLICK IS WORKING
    <div class="document-container">
        <!-- PDF show in iframe -->
    </div>
    <div class="doc-overlay" ng-click="vm.openPDF()"> <---- THIS CLICK ISN'T becuse if is hidden by iframe
        <!-- any content is shown on the top of PDF file in chrome only, not in IE -->
    </div>
</div>
</div>
</div>

The click event works on <h3> tag but not when clicking on the div with css class 'doc-overlay'.

How can I address this issue?

Note: I am using Foxit Reader plugin for IE11

Update1

I came across this similar question, where the iframe was overlapping .doc-overlay causing the click event to malfunction. Any suggestions to resolve this, please?

Answer №1

It appears that the issue at hand is related to CSS formatting. Utilizing SCSS format may be causing the DOM to have trouble locating the "doc-overlay" class.

To resolve this, you can implement the following CSS code:

div.document-previewer-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
div.document-previewer-container> div.document-preview {
    height: 88%;
    position: relative;
}
    div.document-previewer-container> div.document-preview .document-container, .text-container, video, iframe, pre {
        height: 100%;
        width: 100%;
        position: relative;
    }

    div.document-previewer-container> div.document-preview .document-container > img {
        max-height: 100%;
        max-width: 100%;
    }

   div.document-previewer-container> div.document-preview .text-container pre {
        margin: 0;
        padding: 0;
    }

   div.document-previewer-container> div.document-preview .doc-overlay {
        width: 95%;
        height: 95%;
        position: absolute;
        cursor: pointer;
        top: 0;
}
div.document-previewer-container> div.document-preview  .doc-overlay p {
       padding: 2px;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ensure the latest item is stored in the browser's local storage

I'm currently working on developing a flipbook-type application using HTML canvas in React. One issue I've encountered is that when I save an object (drawing) from the canvas to local storage, it saves not only the current project but also the pr ...

Searching for a name in JSON or array data using jQuery can be accomplished by utilizing various methods and functions available

Having trouble searching data from an array in jQuery. When I input Wayfarer as the value for the src_keyword variable, it returns relevant data. PROBLEM The issue arises when I input Wayfarer Bag as the value for the src_keyword variable. It returns em ...

Scaling down the screen for a smaller display

Having trouble achieving a specific effect and could use some assistance. My goal is to create an action where, upon clicking on the nav element (for simplicity, I've set it to be triggered by clicking anywhere on the body), the following should occur ...

What is the best way to create a distinct key for the key prop in my map function within a React component?

This is the initial code I have: class Board extends Component { static defaultProps = { nrows: 5, ncols: 5, chanceLightStartsOn: 0.25 }; constructor(props) { super(props); this.state = { hasWon: false, board: this. ...

Controlling the Alignment of HTML Div Elements

I'm struggling to align some of these divs, especially centering them. I want the page to closely resemble this image: Here are the specific requirements: 1) The header text should be centered vertically and placed in a separate div with a black back ...

The extjs datecolumn is displaying dates with a one-day discrepancy

My Ext.grid has a datecolumn, but I'm experiencing an issue where the dates displayed are off by one day. The problem seems to be related to timezones, as when data is added to the store it shows up differently later on. For example, 2013-03-31 becom ...

Exploring the potential of Django to efficiently implement multiple listviews on a single webpage

Recently started working with Python and Django, but I may have bitten off more than I can chew. If anyone has the time to help educate me, I would greatly appreciate it. My main model deals with "work orders," each of which is linked to subsets of data. I ...

Adaptable Semantic UI form design

Welcome, internet friends! If anyone out there has a moment to spare and is familiar with Semantic UI, I could really use some assistance... Currently, I am working on a form that looks great on larger screens like this: https://i.stack.imgur.com/cafc5.j ...

The selection element is unresponsive to clicks when the ng-click attribute is present in the parent element

Just a quick question. I've observed that when I use an ng-click function above a select element, clicking on the dropdown list doesn't update the value. Here's the HTML code: <div ng-controller="MyController" ng-app> <div ng-cl ...

extract all elements from an array nested within another array

I am having difficulty extracting data from an array file in PHP. I was able to read it and convert it into a PHP array, but now I want to display the stored information in a table, however, I keep getting incorrect values. How can I retrieve the informat ...

Setting up the file structure for customizing Bootstrap with Sass

Hello, I am currently setting up Bootstrap for customization using Sass. After creating an HTML page, I attempted to add my own custom properties to the custom.scss file. Unfortunately, these changes do not seem to affect my page as expected. I followed s ...

Generate a new Div dynamically, positioned higher than the rest

Once a second, this script will utilize AJAX to open a new page and display the contents in a dynamically created div on this page. However, the issue is that the new divs are stacking under each other, and I would prefer them to be added at the top instea ...

What is the best approach to create a JavaScript search filter function spanning two pages?

Page1.html has a form with a drop-down menu containing options Color and Shape. There is also a submit button. Assuming Page2.html displays various shapes like Blue Square, Red Square, Blue Circle, Red Circle, is it feasible to create a JavaScript file th ...

Issue with element alignment using CSS increments

I'm confident that this code should be functioning properly, but for some reason it's not. I feel like there must be a small detail that I'm overlooking: Markup: <section id="content"></section> Styling: #content { positi ...

My Next.js application does not display an error message when the input field is not valid

I've recently developed a currency converter application. It functions properly when a number is provided as input. However, in cases where the user enters anything other than a number or leaves the input field empty, the app fails to respond. I aim t ...

what is the best way to position a glyphicon next to a form?

Forgive me for asking such a basic question, but I struggle with aligning and positioning elements. Here is my issue: https://i.sstatic.net/Uy6XB.jpg https://i.sstatic.net/TTs6V.jpg All I want is for the glyphicon to be displayed next to the textfield, ...

Using jQuery to select the third element from every group of six

I am attempting to select the 3rd .foo element out of every set of 6. To clarify, here is a brief example: 1 2 3 (this) 4 5 6 1 2 3 (this) 4 5 6 and so on... So far, I have only managed to target every 3rd element, which is not exactly what I need beca ...

Using Javascript to Swap the Content of an Element

Recently, I've been delving into the world of javascript and have hit a roadblock. I understand how to instruct javascript to set a specific value for an ID, but now I have a new challenge: I want to create javascript code that can retrieve informati ...

Even with minify and uglify plugins implemented, the React App remains unminified

I am facing a major issue with my reactjs app in production, as it exceeds 1.8 MB. I urgently need to reduce the size of the app. Below is the analysis from webpack: https://i.sstatic.net/skVfV.png Here is my webpack.config.js: const path = require( ...

What is the best way to implement the Snackbar functionality within a class-based component?

My snackbar codes are not working as expected when I click the "confirm" button. I want the snackbar to appear after clicking the button. Most examples I've seen use functional components, so how can I get the Snackbar to work properly in a class comp ...