jquery-match-height icon indicating copy to clipboard operation
jquery-match-height copied to clipboard

Safari problem

Open snecz opened this issue 9 years ago • 14 comments

Hello, thanks for great plugin. Working great. I have only one problem with Safari browser. On first load of the page it calculates wrong height. Than after resizing the window it's as it should be. Where can be the problem?

snecz avatar Oct 05 '15 13:10 snecz

Same problem

perekrestov-igor avatar Oct 15 '15 14:10 perekrestov-igor

I had the same problem, turned out to be that it doesn't play well with <a> elements. I changed my <a> to a <div> and that fixed the problem for me.

tonvanalebeek avatar Nov 10 '15 11:11 tonvanalebeek

I can't reproduce the issue. Can you provide more information? Which version of Safari? Can you send me some example code?

liabru avatar Nov 11 '15 20:11 liabru

I came here looking for an already made solution as I am having the same problems with a plugin I wrote on both safari desktop and ios. It may be helpful to note that safari doesn't seem to populate the height of elements in time. Just using jquery, either $(function(){}), $(window).on('load',function(){}), or even as a callback to a function; unless I set a timeout on the function I am calling it sets an incorrect height. I realize that this isn't your plug-in code i'm dealing with just bugs i have observed with the browser. For what it's worth I hope it's helpful. In order to fix my issue I was thinking of checking the element to see what it's current height was and if it was 0 set a timeout to recall the function to execute again.However, the issues described above are exactly what i'm experiencing using just jquery. ;) If I can help in any way i'd love to. P.S. typically a timeout of 150-250 ms solved the issue but I know you can't rely on that in all cases.

zanderi avatar Nov 19 '15 21:11 zanderi

Thanks for the additional info @zanderi.

Can you tell me if you see the issues on http://brm.io/jquery-match-height-demo/? All tests pass for me on Safari.

As I can't reproduce this issue, I still need someone to provide a working example.

liabru avatar Nov 19 '15 21:11 liabru

@liabru I cannot the example is solid. More additional info in my case is that the elements displaying issues in these browsers are those that are added dynamically using Knockout JS. I can try setting up your demo to load through Knockout and see if it portrays the same behavior.

zanderi avatar Nov 19 '15 21:11 zanderi

More information: bug present in opencar default theme 2

I have solved problem by setting parameters:

  byRow: true,
  property: 'min-height',
  target: null,
  remove: false

perekrestov-igor avatar Nov 20 '15 09:11 perekrestov-igor

I'll try to reproduce working example.

snecz avatar Nov 20 '15 10:11 snecz

got the same issue today. I will try my best to figure out, what's wrong

vudaltsov avatar Jul 05 '16 09:07 vudaltsov

I got this issue today, just figure its about font load. In my case, if some font fail to load it will cause the plug in calculate wrong height.

goesredy avatar Jun 30 '17 14:06 goesredy

I'm going to guess that the issue might be covered by the Known Limitations section of the readme?

liabru avatar Jul 13 '17 09:07 liabru

@liabru Yes, I knew it. Just want to tell another about this problem, so they can check their own problem and fix it.

goesredy avatar Jul 18 '17 05:07 goesredy

Adding 'jQuery( document ).ready(function()' fixed it for me.

m7ess5 avatar Sep 17 '18 07:09 m7ess5

with Safari, it seems that it is working "only" partially. it works only with certain window widths. can you please troubleshoot this https://github.com/maustyle/safari-match-heights ?? thank you

m7ess5 avatar Nov 22 '18 05:11 m7ess5