mattwatsoncodes / link-picker-for-cmb2

Link Picker control designed to work with CMB2
https://wordpress.org/plugins/link-picker-for-cmb2/
3 stars 7 forks source link

Not working when using in a repeatable group #3

Closed noquierouser closed 7 years ago

noquierouser commented 7 years ago

I'm trying to use a link_picker field inside a repeatable group field, but the expected behavior (modal dialog) is not happening, and I'm unable to return to the state previous to clicking (no scroll/scrollbar, can't dismiss invisible modal dialog, can click through backdrop).

In JS console this happens when clicked:

TypeError: this.textarea is undefined [Learn more]  load-scripts.php:687:2738
  wpLink.refresh https://localhost/wptest/wp-admin/load-scripts.php:687:2738
  wpLink.open https://localhost/wptest/wp-admin/load-scripts.php:687:2376
  <anonymous> https://localhost/wptest/wp-content/plugins/link-picker-for-cmb2/js/plugin.js:16:3
  n.event.dispatch https://localhost/wptest/wp-admin/load-scripts.php:3:12392
  n.event.add/r.handle https://localhost/wptest/wp-admin/load-scripts.php:3:9156
mattwatsoncodes commented 7 years ago

Hi @noquierouser,

I'm afraid I cannot recreate, however I did fix that issue previously. Do you get the same if you pull the latest version of the master branch?

I do see some other JS errors, but none preventing the pop-up. I will look at those as part of this issue.

mattwatsoncodes commented 7 years ago

Hi again @noquierouser,

I managed to recreate your issue. I was hooking into a hook that fires on all edit screens apart from the 'page' edit screen.

This has been resolved, along with a massive refactor and all JS bugs squashed.

Thanks for your input, and if you find any more issues, please give me a shout!

noquierouser commented 7 years ago

@mwtsn Excellent. I'll checkout the latest code and try it. Thanks!