mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Handling links inside of iframe in via Pym.
This commit is contained in:
@@ -5,7 +5,7 @@ const Comment = props => {
|
||||
return (
|
||||
<div className={styles.myComment}>
|
||||
<p className="myCommentAsset">
|
||||
<a className={`${styles.assetURL} myCommentAnchor`} onClick={props.link(`${props.asset.url}#${props.comment.id}`)}>{props.asset.url}</a>
|
||||
<a className={`${styles.assetURL} myCommentAnchor`} href='#' onClick={props.link(`${props.asset.url}#${props.comment.id}`)}>{props.asset.url}</a>
|
||||
</p>
|
||||
<p className={`${styles.commentBody} myCommentBody`}>{props.comment.body}</p>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ import {connect} from 'react-redux';
|
||||
|
||||
import {saveBio, fetchCommentsByUserId} from 'coral-framework/actions/user';
|
||||
|
||||
import {link} from '/coral-framework/PymConnection';
|
||||
import {link} from 'coral-framework/PymConnection';
|
||||
import BioContainer from './BioContainer';
|
||||
import NotLoggedIn from '../components/NotLoggedIn';
|
||||
import {TabBar, Tab, TabContent} from '../../coral-ui';
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
pymParent.onMessage('navigate', function (url) {
|
||||
window.open(url, '_blank').focus();
|
||||
})
|
||||
|
||||
// wait till images and other iframes are loaded before scrolling the page.
|
||||
// or do we want to be more aggressive and scroll when we hit DOM ready?
|
||||
|
||||
Reference in New Issue
Block a user