Opened 8 years ago
Closed 5 years ago
#36689 closed defect (bug) (maybelater)
New WPLink in Modal Window
Reported by: | berengerzyla | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.1 |
Component: | TinyMCE | Keywords: | |
Focuses: | javascript, administration | Cc: |
Description
Hello!
I have an issue with the last WPLink.
I use an editor in a TinyMCE window (editor.windowManager.open
), instantiated as follow:
$.extend( {}, tinyMCEPreInit.mceInit.content, { body_class: 'description', selector: '#description', toolbar1: 'bold,italic,link,unlink', toolbar2: '', toolbar3: '', toolbar4: '', theme_advanced_statusbar_location: 'none', elementpath: false, wpautop: false, remove_linebreaks: false, forced_root_block : "", apply_source_formatting: true } );
This version doesn't work anymore (used to), for in wpview/plugin.js
, it throws an error, as I want to edit without the p tags.
{{{Uncaught TypeError: first.getBoundingClientRect is not a function
line 243 of wpview/plugin.js.}}}
But even if I comment out wpautop
and force_root_block
in the initialization, the WPLink won't show up.
It gets populated (the link url is put into wp-link-preview
), if I look at the DOM, but is not positioned and stays at display:none
.
Any idea? Any tip on how I could debug that?
Thank you!
Change History (3)
This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.
8 years ago
#3
@
5 years ago
- Resolution set to maybelater
- Status changed from new to closed
Looking again, still can't figure out what the problem is. The code that used to throw that error doesn't exist any more in wpview/plugin.js. From the wp-link popup not showing up it sounds like some code is not running. TinyMCE silences some errors in its plugins to prevent them from bringing the whole editor down.
In any case, this is now superseded by the block editor. Closing as maybelater. Feel free to reopen if you were able to figure out what the cause is. Adding another TinyMCE instance inside of a dialog of a TinyMCE instance seems like may be causing conflicts between the two instances.
Here is some more information about the context:
Here is the opening segment:
… and a simple extract of my field in the template: