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)
- Adder occluded for certain gh views - z-index issue? HOT 4
- Inject additional LMS metadata for file export container object
- Improving sorting / grouping of entries in client configuration documentation
- Implement logic to build and download export data HOT 3
- Adder position doesn't update when scrollable container is scrolled
- Review the usage of `Annotation` type accorss the app
- Do not export draft annotations HOT 1
- Remove the `html_side_by_side` feature flag HOT 1
- Generate suggested filename and validate user-inputted filenames for export HOT 3
- Debug failing a11y test on tabbed dialog variant in `ShareDialog` HOT 6
- Consider localizing the date used in suggested export annotations filename
- Find a way to make `checkAccessibility` helpers work when rendered component's first child is a Fragment
- Allow users to upload an export file in Import tab
- Write logic to upload and parse JSON annotations (exported annotations)
- Implement Import tab UI and connect to upload logic
- Perform annotation imports (happy path) HOT 1
- Show error message if annotation export fails
- Parse imported file HOT 1
- For export, export filename should derive from document filename or title. HOT 2
- Whitespaces skipped over when highlighting books on archive.org 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.