I have a problem with dialog in drupal 8, and I found a place that make me stuck. There is a code in this file not work as my expected. Please see the image
I just want to do the simple thing is comment the line out like below:
I can't do this because this is core file. So I want to override this file or this function only.
I trying to use libraries-override but no hope. This is my code, I am newbie so this code may have mistake or wrong.
"capital" is my theme, not module
below is my theme structure:
Please help... I googled this issue for long time.
I have solved it by myself:
Step 1: clone core js to your theme js like this:
Step 2: modify template library ([your-theme-name].libraries.yml) Declare core file your need to add to your theme
Step 3: disable core files using your theme info file ([your-theme-name].info.yml) and add your files as library:
That's it :) Any better idea? please suggest me more.