I've added a public reposition method to allow manual repositioning of the popup after the contents have been changed.
I've also added the escCloseAll option to control if all open or only the topmost popup should be closed, default true.
expose a reposition method to allow manual repositioning
Added escCloseAll option to control if all popups or only the topmost…
… popup should be closed after pressing esc
Fix issue with (un)binding events
I really like the reposition option 👍
I like the reposition option too
Added in v. 0.10.0 (https://github.com/dinbror/bpopup#v-0100-07-22-2014)
Just wanted to give a heads up on the reposition function.
Don't know if anyone tested it, but there's a clear bug in it.
When repositioning IF statement only checks for fixedPosStyle and not fixedVPos and fixedHPos, so in my case "position: ['auto', 0]", it doesn't reposition it properly in the center.
Think there are also some hardcoded values in there as well.
Also why is there "if (inside) " check no idea???
You're right. Didn't test against that use case. Will have a fix in the next release.
The "if(inside)" is mostly for when you resize the window. If the popup is too big and doesn't fit the window it won't move the popup to ensure that you always can see everything inside the popup.
yeah I got resizing case, but it still kinda screws up stuff. maybe move the check into option so make it optional?
I know what you mean, I think to fix my issue separating inside to X and Y will fix it. Since I still want it to align to center even if vertically it should stay on the same spot.
fixed in v. 0.11.0