Halt spread: descend in a bubble?

It seems that the issue at hand may not be related to propagation, but rather a design flaw. I have come across information suggesting that propagation problems tend to bubble up, however, let me explain my situation. I am working with a table edit grid.

Each cell in this grid contains two main blocks: an Editing div (which houses a form for editing displayed values) and a View div (which displays the values). Both are set to overflow hidden in order to maintain uniform row height.

Upon loading, the Editing div is not visible while the View div is displayed. When hovering over a cell, the Editing div is shown while the View values are hidden.

The problem arises when the Editing view contains clickable elements (in this case, tags). On phones or tablets, clicking on the coordinates where these clickable elements are located triggers those elements to be clicked.

<td  class="editGridCell" ng-if="!block && ($index > 0)" ng-repeat="attobj in columns track by $index">
  <div class="contentEdit">    
    <form name="theForm" novalidate>
      <div ng-if="true"  ng-init="attobj = attobj.attobj" ng-include src="getAttValuesEditorTemplate(dbo, attobj)">
      </div>
    </form>
  </div>

  <div ng-class="compressed ? 'contentValues' : 'contentValuesDecompressed'">
    <div  ng-repeat="v in dbo.get4(attobj.key) track by $index">
      <p ng-if="v.cid">{{ v.displayName() }}</p>
      <p ng-if="!v.cid">{{ v }}</p>
    </div> 
  </div>
</td>

The template the form calls contains clickable tags:

<script type="text/ng-template" id="form_field_ref">
  <div ng-init="tmp = dbo.get(attobj.name)">
    <div ng-model="tmp" ui-sortable="{ 'ui-floating': undefined}" class="clearfix">
      <div ng-repeat="dbo2 in dbo.get(attobj.name) track by $index" style="float:left; padding-right: 3px; padding-bottom: 5px;">
        <div class="tag sortableTag">
          <a href="#/view/{{ dbo2.cid }}" target="_blank"gt;{{ dbo2.displayName() }}</a>
          <a href="" class="glyphicon glyphicon-remove" ng-click="removeValue(dbo, attobj.name, $index)"></a>
        </div>
      </div>
    </div>
  </div>
  
  <div ng-include="'typeaheadtemplate'" style="width: 100%;"></div>
</script>

CSS Styles:

.superResponsive .editGridCell{
  border: 1px solid lightBlue;
  vertical-align: top;
  position: relative;
}

.contentEdit{
  display:none;
  overflow: hidden;
  padding:4px;

}

.contentValues{
  display:block;
  color:#0887A7!important;
  min-height: 20px;
  overflow: hidden;
  /*min-width:100px;*/
  width:100%;
  height: 25px;
  padding: 5px;
}
.contentValuesDecompressed{
  display:block;
  color:#0887A7!important;
  min-height: 25px;
  overflow: visible;
  /*min-width:100px;*/
  width:100%;
  height: auto;
  padding: 5px;
}

.contentDecompressed{
    color:#0887A7!important;
    min-height: 25px;
    overflow: visible;
    width:auto;
    height: auto;
    padding: 5px;
}

.editGridCell:hover .contentEdit{
  display: block;
  height:auto;
  width: 90%;
  background:#d8ecf2;
  position:absolute;
  z-index: 40;
  overflow: visible;
}

.editGridCell:hover .contentValuesDecompressed{
  visibility: hidden;
}

.editGridCell:hover .contentValues{
  visibility: hidden;
  overflow:visible;
}

ON MOBILE DEVICES, A CLICK ON THE CELL TRIGGERS TAG CLICK(IF TAG WILL SHOW)! https://i.stack.imgur.com/hnLnB.png

To simplify the issue:

https://jsfiddle.net/coolcatDev/yqjzvcyw/

Answer №1

If I want to delay the hover effect, I can do it like this:

For the HTML:

<div class="container">
    <a class="link" href="https://example.com">Click Here</a>
</div>

And for the CSS:

.container{
    border:1px solid gray;
    width:120px;
}
.link{
    visibility:hidden;
}
.container:hover .link{
    visibility:visible;
    transition-delay: 0.5s;
}

Check out the example here: https://jsfiddle.net/creativeCoder/samplelink123/

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

Dealing with an unexpected token error in JSON? Learn how to properly handle removing special characters like quotation marks and line breaks to

After receiving a JSON response from the server during page load, I successfully populate it on the page using Handlebars.js. However, I am facing difficulties in storing this JSON object in a JavaScript object. Here is what I tried: var jsObject = "{{o ...

Unable to view new content as window does not scroll when content fills it up

As I work on developing a roulette system program (more to deter me from betting than to actually bet!), I've encountered an issue with the main window '#results' not scrolling when filled with results. The scroll should always follow the la ...

An oversized image creates additional room

I currently have a board that consists of 3 blocks, with each block containing a grid of 25 squares. These squares are 40x40px in size with a margin around them, resulting in an overall size of 220px x 220px. Each square also has some space above and below ...

Confusion surrounding the Javascript object prototype (utilizing require.js and three.js)

I'm feeling a bit confused about my understanding of Objects, prototypes, require.js and three.js. Let me illustrate with an example: In Summary: The instance "wee" is derived from "Wee," which acts as a wrapper or monkey patch for THREE... Shouldn& ...

Is there a way to access specific methods within a JavaScript file?

Within my javascript assets folder, I have a file named jstester.js that looks like this: function hehe() { alert("wedsdsd"); } document.write("fdygsdfysdgf"); Then in the main index.html file in the public directory, I include the following code: & ...

Looking to create a row-column-row layout using CSS flexbox techniques

` I am trying to create a unique row-column-row layout using CSS flexbox. Below is the code snippet I have: * { padding: 0; margin: 0; box-sizing: border-box; } .container { display: flex; flex-wrap: wrap; gap: 0.2%; } .box { color: whit ...

encountering a problem with iterating through a JSON array

After making an ajax call and retrieving select options in json format, I implemented the code below to display these new options in place of the existing ones: success: function (data){ var $select = $('#dettaglio'); $select.html(' ...

Only apply the CSS rule to all pages except for one

I'm a beginner when it comes to css. In my wordpress website editor (Onetone theme), I added the following rule to my 'custom css field': html, body {margin: 0; height: 100%; overflow: hidden} It's working well...the scrollbar is gone ...

Effect on Label in WordPress Contact Form 7 When Input Field is Populated

Currently, I am attempting to achieve the floating label effect on Contact Form 7 and have encountered an issue. Although I have successfully implemented the label effect on input:focus, I am struggling to make it persist once text has been entered and foc ...

A guide to incorporating nested loops with the map method in React JS

I've come across numerous threads addressing the nested loop using map in React JS issue, but I'm still struggling to implement it in my code. Despite multiple attempts, I keep encountering errors. Here are some topics I've explored but cou ...

Unlimited Possibilities in Designing Shared React Components

Seeking the most effective strategies for empowering developers to customize elements within my React shared component. For example, I have a dropdown and want developers to choose from predefined themes that allow them to define highlight color, font siz ...

What are the signs of a syntax error in a jQuery event like the one shown below?

One of my forms has an ID attribute of id ='login-form' $('#login-form').submit(function(evt) { $('#login-button').addClass('disabled').val('Please wait...'); evt.preventDefault(); var postData = ...

Can a button be connected to both navigate to another webpage and trigger a modal to appear on it simultaneously?

Is there a way to connect a button to a modal on a different page so that when the button is clicked, it opens another page (in a new tab with target 0) with the modal already displayed? ...

Expandable sidebar using responsive Twitter Bootstrap

I am in search of a CSS solution to implement a button that can toggle a sidebar on and off using twitter bootstrap. Is there a specific term for those small icons seen on webpages that resemble pull tabs when the sidebar is closed and then move along wit ...

CSS: Unexpected value, received NaNrgb

I was attempting to incorporate a checkbox into a Bootstrap form that turns green when it is checked. Here is the code I used: function updateColor() { $("#check1").animate({ "background-color": "rgb(209, 231, 221)" }); } <script src="http ...

Is there a way to turn off the auto-complete feature for JavaScript keywords in HTML within JSX in WebStorm?

While using WebStorm, I've noticed that it automatically completes JavaScript keywords as I type regular text in JSX. This behavior is starting to frustrate me because I have to constantly press ESC or click elsewhere to hide the auto-complete popup. ...

What is the process to discover, upload, and implement a custom font?

In my quest to locate and incorporate a font named neontubes, or if not available, a font called freestyle script, I have learned that I must obtain an src which is then included in my style.css file and subsequently designated in the styling rule like s ...

Utilizing ng-repeat and ng-if to display dynamic data fetched from the server

I have social media icons with a like button that turns red only if item.like== 1, or remains white if item.userid==0. I am updating this dynamically and need to call the function profileData() again when a user clicks the like button. However, every time ...

React Material-UI Multiple Select with Checkboxes not displaying initial selections as checked

I am fairly new to working with React and MUI, so please bear with me. Currently, I am in the process of learning how to create Multiple Select Options with checkboxes by populating the Dropdown Options from an Array. Although I have set up the initial/de ...

What is the process for generating an array of objects using two separate arrays?

Is there a way to efficiently merge two arrays of varying lengths, with the number of items in each array being dynamically determined? I want to combine these arrays to create finalArray as the output. How can this be achieved? My goal is to append each ...