-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert workaround to non-polymer version, but keep as typescript
- Loading branch information
Showing
7 changed files
with
37 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
<!doctype html> | ||
<!-- Imports for all Chrome-specific Polymer elements. This ensures that the elements will be vulcanized along with the generic UI Polymer elements. --> | ||
|
||
<link rel='import' href='workarounds.html'> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// CCA-specific workarounds. | ||
|
||
(function () { | ||
// Force a repaint every 300 ms. | ||
// Extremely hacky workaround for https://crbug.com/612836 | ||
|
||
let sendResize = true; | ||
|
||
setInterval(function () { | ||
if (sendResize) { | ||
window.dispatchEvent(new Event('resize')); | ||
} else { | ||
console.debug('suppressed resize event'); | ||
} | ||
}, 300); | ||
|
||
// Workaround for janky inviteUserPanel transition, | ||
// which is caused by the workaround above. | ||
// https://github.com/uProxy/uproxy/issues/2659 | ||
document.addEventListener('uproxy-root-ready', function () { | ||
// The 'uproxy-root-ready' event is dispatched in the `ready()` method of | ||
// the uproxy root object instantiated in src/generic_ui/polymer/root.ts. | ||
console.debug('got uproxy-root-ready'); | ||
let inviteButton = document.querySelector('uproxy-root /deep/ #inviteButton'); | ||
if (!inviteButton) { | ||
console.error('#inviteButton missing:', inviteButton); | ||
return; | ||
} | ||
inviteButton.addEventListener('tap', function () { | ||
sendResize = false; | ||
setTimeout(function () { sendResize = true; }, 2000); | ||
}); | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters