Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yett.unblock() conflicting with what-input.js / foundation modal #16

Open
ubani opened this issue Dec 5, 2019 · 6 comments
Open

yett.unblock() conflicting with what-input.js / foundation modal #16

ubani opened this issue Dec 5, 2019 · 6 comments

Comments

@ubani
Copy link

ubani commented Dec 5, 2019

Hi thanks, for this awesome piece :)

I am using foundation's framework modal.
It works perfectly fine when yett is blocking other scripts.
The source is on the whitelist so also that works well.

However when I unblock the scripts with

yett.unblock();

I've found that yett.unblock() prevents whatinput.js to work properly.

So e.g. modal buttons / links do not fire anymore


// foundation CSS
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.2.3/motion-ui.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/css/foundation-prototype.min.css">


// foundation button
<div class="button">
  <a data-open="modal"  
   aria-controls="modal" 
   aria-haspopup="true" 
   tabindex="0"
   >READ MORE
   </a>
</div>

// foundation modal
<div class="reveal" 
   id="modal" data-reveal="cenwos-reveal" 
   role="dialog" aria-hidden="true" 
   data-yeti-box="modal" 
   data-resize="modal" 
   tabindex="-1" 
   style="display: block; top: 100px;"
   > 
 
   <button class="close-button" data-close="" aria-label="Close modal" type="button">
   <span aria-hidden="true">×</span></button>
 
</div>


// foundation scripts
<script src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.3/js/foundation.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.2.3/motion-ui.min.js'></script>
<script>
    $(document).foundation();
</script>

@ubani ubani changed the title unblocking scripts blocks foundation's modal yett.unblock() conflicting with what-input.js / foundation modal Dec 5, 2019
@patrickhoehn
Copy link

It's also conflicting with this date picker: https://codepen.io/mithicher/pen/VwvZaxm
It skips months and randomly closed the date picker field. When I remove unblock() from the code, it works like it should.

@sunilit42
Copy link

@DanielRuf @elbywan @ryhinchey @patrickhoehn
Any update ?

@DanielRuf
Copy link
Contributor

Hi @sunilit42,

not sure why you mentioned me. I am not actively involved in foundation anymore. The projects are now maintained by someone else.

Best is you file a new bug report in the relevant repositories.
Sorry that I can not be really helpful here.

@elbywan
Copy link
Owner

elbywan commented Aug 10, 2022

Any update ?

@sunilit42 If anyone want to have a look, PRs are welcome but I doubt there is anything to be done on the yett side.

@sunilit42
Copy link

@elbywan whitelist domain js execution happen from your js that is issue

@elbywan
Copy link
Owner

elbywan commented Aug 12, 2022

whitelist domain js execution happen from your js that is issue

@sunilit42 This does not really mean anything, the whitelist can be configured by the user. As said, if you want to investigate PRs are welcome. Or just providing a real technical explanation about the issue would also be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants