You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Sun Editor version 2.47.0 with the default “Link” plugin. When I add a link with the “Open in New Window” option unchecked and set the editor to read-only mode, the link (e.g., Google) still opens in a new window instead of the same window. This happens regardless of whether the “Open in New Window” option is checked or unchecked. Is this a bug, or am I missing a configuration?
What I observe is that in the _anchor.js file, the code is as follows: if (contextAnchor.newWindowCheck.checked) anchor.target = '_blank'; else anchor.removeAttribute('target');
When I explicitly replace anchor.removeAttribute('target') with anchor.target = '_self', it works as expected. However, in version 2.47.0, the code else anchor.removeAttribute('target'); causes the link to open in a new tab regardless of whether the newWindowCheck option is unchecked.
I am using Sun Editor version 2.47.0 with the default “Link” plugin. When I add a link with the “Open in New Window” option unchecked and set the editor to read-only mode, the link (e.g., Google) still opens in a new window instead of the same window. This happens regardless of whether the “Open in New Window” option is checked or unchecked. Is this a bug, or am I missing a configuration?
What I observe is that in the _anchor.js file, the code is as follows:
if (contextAnchor.newWindowCheck.checked) anchor.target = '_blank'; else anchor.removeAttribute('target');
When I explicitly replace anchor.removeAttribute('target') with anchor.target = '_self', it works as expected. However, in version 2.47.0, the code else anchor.removeAttribute('target'); causes the link to open in a new tab regardless of whether the newWindowCheck option is unchecked.
Experimental link: https://jsfiddle.net/5p978er4/3/
@JiHong88
The text was updated successfully, but these errors were encountered: