Skip to content

Commit

Permalink
nit - don't need to pass target param (#31746)
Browse files Browse the repository at this point in the history
  • Loading branch information
raxsha committed Dec 29, 2020
1 parent ecd7afd commit 558da27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/amp-story/1.0/page-advancement.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ export class ManualAdvancement extends AdvancementConfig {

if (
this.isInStoryPageSideEdge_(event, pageRect) ||
this.isTooLargeOnPage_(event, target, pageRect)
this.isTooLargeOnPage_(event, pageRect)
) {
event.preventDefault();
return false;
Expand Down Expand Up @@ -597,18 +597,18 @@ export class ManualAdvancement extends AdvancementConfig {
* Checks if click target is too large on the page and preventing navigation.
* If yes, the link is ignored & logged.
* @param {!Event} event
* @param {!Element} target
* @param {!ClientRect} pageRect
* @return {boolean}
* @private
*/
isTooLargeOnPage_(event, target, pageRect) {
isTooLargeOnPage_(event, pageRect) {
// Clicks with coordinates (0,0) are assumed to be from keyboard or Talkback.
// These clicks should never be overriden for navigation.
if (event.clientX === 0 && event.clientY === 0) {
return false;
}

const target = dev().assertElement(event.target);
const targetRect = target./*OK*/ getBoundingClientRect();
if (
(targetRect.height * targetRect.width) /
Expand Down

0 comments on commit 558da27

Please sign in to comment.