question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please inherit relatedTarget from original event for modal.show

See original GitHub issue

As Bootstrap.Modal designed, data can be fetch from the trigger button to the modal.

But when I tried to do this in bootstrap-vue, event.relatedTarget seems being null when I need it. (And I’m sure that I trigger the modal via a button, a b-btn)

Modal show trigger: image

Related methods: image

Browser Console: image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tmorehousecommented, Nov 4, 2018

Currently the show() method doesn’t support passing a value to it, but it might be something we could do, and pass that value into the show events emitted.

The other option is to have your button handlers set a flag in your app/component data, and then inspect that value on modal open to determine which button triggered the open.

0reactions
ColinTreecommented, Nov 4, 2018

No worries, that is what I think I should do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap modal dialog, show.bs.modal event relatedTarget is ...
relatedTarget ) was not available for the 'show.bs.modal' event. Anyone with the same problem should check his bootstrap version first.
Read more >
how do i make model popup to persist on page unless button ...
Hi micah,. In which scenario the modal popup will disappear ? After the submit button clicked ? The buttons are asp.net buttons or...
Read more >
Bootstrap Popover X - © Kartik - Krajee JQuery Plugins
Event inherited from Bootstrap Modal. This event is fired when the popover has finished being hidden from the user (will wait for CSS...
Read more >
BSN - Native JavaScript for Bootstrap - GitHub Pages
This is a test demonstrating the component capabilities and it's original events, you should open the console and start clicking, you will be...
Read more >
MouseEvent.relatedTarget - Web APIs | MDN
The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one. ... For events with no secondary ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found