-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anchors (not links) shouldn't open in a new tab #96
Comments
Just to clarify: This is an issue on EE? So copying and pasting anchor links into an EE instance makes the links open new tabs, correct? If so, it looks like it's an issue with the target attr. If it seems like a big enough issue maybe could catch clicks and force the target to <a href="#onevent-handler" target="_self"> As a side note when looking at this I ran into an interesting bug. If you click a link that opens a new tab while in full screen mode, it obviously kicks you out of fullscreen. If you then try to switch back to edit mode, any key press will return you to preview mode until you refresh the EE instance. Let me know if you can reproduce. (Chrome) |
Yes. Ticket #76 fixed external links. I did a easy fix by adding a base tag: Commit: Current src: I did this because the alternative would be to inject a script that traverses all the |
Also @johnmdonahue I can't repro what you explained, however I might be taking the wrong steps:
|
Hmm very strange. It happens on my end every time. Here is what I am doing in Chrome(18.0.1025.168):
Same behavior occurs in Safari except opening the new tab does not close fullscreen. Also it doesn't seem to matter if shortcuts are used or UI buttons. |
Awh, yep. Shit, actually even just closing full screen with esc does this. This is most likely from: https://github.com/OscarGodson/EpicEditor/blob/0.1.0-build-refactor/src/editor.js#L568 We need to remove that handler when fullscreen is closed is all (probably). I'd make a new ticket tho. This affects IE9, FF, and Chrome. And make it important ;) |
@johnmdonahue added what you reported to ticket #97 and fixed it. |
@OscarGodson So this is closed right? |
No. The other one you reported in this ticket was. On May 13, 2012, at 8:42 PM, John Donahue
|
Whoops. :) |
* upstream/develop: Ticket OscarGodson#96 - Make hash links scroll the iframe, not open a new browser window Ticket OscarGodson#6 - Shitty patch for Safari fullscreen. Using faux fullscreen until Safari gets fixed Prevent loading the editor when it's already loaded Typo in comment Ticket OscarGodson#161 - Remember the edit or preview state on unloading so when you load again its where you left it. Also added a guard for calling load when its already loaded to save on memory and changed all _eeState checks internally to use is() instead Ticket OscarGodson#88 - Added public is() method to check the state of EE. Added docs and tests and changed eeState to _eeState Conflicts: epiceditor/js/epiceditor.js epiceditor/js/epiceditor.min.js src/editor.js
This isn't working on Firefox. GOD. |
Going to reclose this since this is a long outstanding Firefox bug. Theres no decent way to hack it either. The hack would be gnarly and only for Firefox so instead I reported it and they seem to be looking at it now, hopefully. |
If you copy and paste our README then click on the
on()
link in the Events section it'll open a new page. It's just a#link
anchor so it shouldn't do this.The text was updated successfully, but these errors were encountered: