Comments (6)
Just a quick additional note/clue, selecting text and then instead clicking the annotate button in the sidebar does work here: the composition window opens in the sidebar and the selected text appears as the target.
from client.
There is definitely an override happening on their site. One that seems to only pass through 1 argument to the click event listener instead of the two that we are binding. It would require a little more digging but this seems like something we can easily rethink how we do the event listeners.
from client.
So my branch fixes this issue of the preventDefault. But, it uncovered the next breaking problem with that website. The set the display:none
property on the button that is being clicked in that panel. That will hide the "Annotate" or "Highlight" button in the adder (depending on which one was used). This is them making a big assumption about what is being used there. So additional work will be needed to make sure the display is not changed as well
from client.
Add assurance of display being set to block in my branch which fixes the second issue they have.
from client.
The interfering Function.prototype.bind
implementation is being installed by MooTools 1.2.5 apparently (evaluate MooTools.version
in the console), and specifically this code: https://github.com/mootools/mootools-core/blob/3e7459cb4756475a80921bfde5c19a7c7edb64df/Source/Native/Function.js#L28
It looks like this issue applies to any page which uses either MooTools <= 1.2.x OR includes the 1.2.x compatibility code.
Minimal example:
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mootools/1.6.0/mootools-core-compat.js"></script>
</head>
<body>
<button id="btn">Click me</button>
<script>
function annotate(command, event) {
console.log(`Annotate should have been called with 2 arguments but was called with ${arguments.length} args`, arguments);
}
var btn = document.getElementById('btn');
btn.addEventListener('click', annotate.bind(null, 'annotate'));
</script>
</body>
</html>
from client.
Sorry about the commit spamming above
This is fixed with client release 0.46.0
from client.
Related Issues (20)
- Can't annotate https://community.canvaslms.com/ (issue with tsParticles) HOT 2
- Validate max length for tags
- Error with iframe `allow` attribute when annotating pages on archive.org HOT 6
- Migrate to eslint flat config HOT 1
- Create a new toast-like notification that is displayed when there are pending updates HOT 2
- Add accessible `tabpanel` role to the panels handled by selection tabs in the sidebar
- Hide "annotate" and "highlight" icons from "Getting started" tab to screen readers
- Consider automatically closing the help panel if auto-opened and user creates annotations HOT 2
- Optionally preserve (carry over) tags for the ensuing annotation
- can't log in at Edge add-on HOT 7
- Multiple annotations by the same person have the same accessible title HOT 3
- Annotation cards can be interacted with the mouse but not with the keyboard
- Reconsider the usage of "dialogs" for non-modal sidebar panels
- When loading pending updates, consider scrolling to the "closest" one, not the latest one HOT 2
- Incorrect Conversion of Overlapping Highlights or Notes Upon Page Navigation HOT 5
- Adder not fully visible due to z-index miscalculation
- Chrome extension doesn't open H overlay on Reddit.com HOT 1
- Hypothesis expects Host in parent frame, not in any ancestor or top frame HOT 2
- Whenever an iframe changes location Hypothesis needs to be injected again HOT 2
- Mechanism for disabling creating annotations and displaying highlights on the host frame for enable-annotations iframe use cases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client.